diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-10-11 17:10:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-10-11 17:10:00 +0800 |
commit | e816c7659048ff6bda2956a2194dfc234549c704 (patch) | |
tree | 6ce13546b763d348c39344c04c70bf65e3a80cdd /script/parser | |
parent | 82c8a84cf0f69f659dbb85af3b068e7e4f81be7f (diff) | |
download | lua-language-server-e816c7659048ff6bda2956a2194dfc234549c704.zip |
fix
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/newparser.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua index c49d2291..747c4f5c 100644 --- a/script/parser/newparser.lua +++ b/script/parser/newparser.lua @@ -1531,8 +1531,8 @@ local function parseTable() } end wantSep = true - index = index + 1 if exp.type == 'varargs' then + index = index + 1 tbl[index] = exp exp.parent = tbl goto CONTINUE @@ -1559,6 +1559,7 @@ local function parseTable() else missExp() end + index = index + 1 tbl[index] = tfield goto CONTINUE end @@ -1572,6 +1573,7 @@ local function parseTable() value = exp, } exp.parent = texp + index = index + 1 tbl[index] = texp goto CONTINUE end @@ -1585,7 +1587,6 @@ local function parseTable() } end wantSep = true - index = index + 1 local tindex = parseIndex() skipSpace() if expectAssign() then @@ -1600,6 +1601,7 @@ local function parseTable() else missExp() end + index = index + 1 tbl[index] = tindex else missSymbol '=' |