summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-11 17:10:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-11 17:10:00 +0800
commite816c7659048ff6bda2956a2194dfc234549c704 (patch)
tree6ce13546b763d348c39344c04c70bf65e3a80cdd /script/parser
parent82c8a84cf0f69f659dbb85af3b068e7e4f81be7f (diff)
downloadlua-language-server-e816c7659048ff6bda2956a2194dfc234549c704.zip
fix
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/newparser.lua6
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 '='