From e574b0b2ef33e8f456abe7d5c48c925701c9df8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 11 Oct 2018 10:22:38 +0800 Subject: =?UTF-8?q?=E5=8C=BA=E5=88=86=E9=94=99=E8=AF=AF=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/matcher/definition.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/matcher/definition.lua b/src/matcher/definition.lua index c449f7ad..35de5ab4 100644 --- a/src/matcher/definition.lua +++ b/src/matcher/definition.lua @@ -66,11 +66,11 @@ return function (buf, pos_) parser.grammar(buf, 'Lua', defs) if not result then - return nil + return false, 'No word' end local name, start = result[1], result[2] if not start then - return nil + return false, 'No match' end - return start, start + #name - 1 + return true, start, start + #name - 1 end -- cgit v1.2.3