diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-07-08 17:27:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-07-08 17:27:18 +0800 |
commit | dd792e6924572117905f7f58574ac38bb361c236 (patch) | |
tree | 043b72199f885d1ba8f9b491236d6e2e8b91cd76 /server/src | |
parent | 013e52642dea0064b625bb62a3528a29f41c4cf9 (diff) | |
download | lua-language-server-dd792e6924572117905f7f58574ac38bb361c236.zip |
修正报错
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/parser/ast.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index e307f8b8..52b34343 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -651,13 +651,14 @@ local Defs = { for i = 1, max-1 do local arg = args[i] local isField = type(arg) == 'table' + local isEmmy = isField and arg.type:sub(1, 4) == 'emmy' if wantField and not isField then pushError { type = 'MISS_EXP', start = start, finish = arg - 1, } - elseif not wantField and isField then + elseif not wantField and isField and not isEmmy then pushError { type = 'MISS_SYMBOL', start = start, @@ -669,7 +670,7 @@ local Defs = { end if isField then table[#table+1] = arg - if arg.type:sub(1, 4) ~= 'emmy' then + if not isEmmy then wantField = false start = arg.finish + 1 end |