Skip to content

Commit 6f5aa8c

Browse files
committed
fix #848
1 parent dc5ee0b commit 6f5aa8c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# changelog
22

3+
## 2.5.4
4+
* `FIX` [#848](https://github.com/sumneko/lua-language-server/issues/848)
5+
36
## 2.5.3
47
`2021-12-6`
58
* `FIX` [#842](https://github.com/sumneko/lua-language-server/issues/844)

script/parser/newparser.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -1649,20 +1649,20 @@ local function parseTable()
16491649
wantSep = true
16501650
local tindex = parseIndex()
16511651
skipSpace()
1652+
tindex.type = 'tableindex'
1653+
tindex.parent = tbl
1654+
index = index + 1
1655+
tbl[index] = tindex
16521656
if expectAssign() then
16531657
skipSpace()
16541658
local ivalue = parseExp()
1655-
tindex.type = 'tableindex'
1656-
tindex.parent = tbl
16571659
if ivalue then
16581660
ivalue.parent = tindex
16591661
tindex.finish = ivalue.finish
16601662
tindex.value = ivalue
16611663
else
16621664
missExp()
16631665
end
1664-
index = index + 1
1665-
tbl[index] = tindex
16661666
else
16671667
missSymbol '='
16681668
end

0 commit comments

Comments
 (0)