summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/parser/newparser.lua4
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index fc18e49b..0df1e08b 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,7 @@
## 2.5.2
* `FIX` [#825](https://github.com/sumneko/lua-language-server/issues/825)
+* `FIX` [#827](https://github.com/sumneko/lua-language-server/issues/827)
* `FIX` [#837](https://github.com/sumneko/lua-language-server/issues/837)
## 2.5.1
diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua
index 513868b0..187de9b3 100644
--- a/script/parser/newparser.lua
+++ b/script/parser/newparser.lua
@@ -1547,6 +1547,7 @@ local function parseTable()
}
Index = Index + 2
local index = 0
+ local tindex = 0
local wantSep = false
while true do
skipSpace(true)
@@ -1623,11 +1624,12 @@ local function parseTable()
goto CONTINUE
end
index = index + 1
+ tindex = tindex + 1
local texp = {
type = 'tableexp',
start = exp.start,
finish = exp.finish,
- tindex = index,
+ tindex = tindex,
parent = tbl,
value = exp,
}