diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-07 14:45:53 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-07 14:45:53 +0800 |
commit | 6f5aa8ca04f97fe3e1d3059b9d7868552fda0158 (patch) | |
tree | 50c88f0aa685515c6070afe9bb070f88d6d9614b | |
parent | dc5ee0b01a9610389e275ed8ff0746ba78cdd367 (diff) | |
download | lua-language-server-6f5aa8ca04f97fe3e1d3059b9d7868552fda0158.zip |
fix #848
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/parser/newparser.lua | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/changelog.md b/changelog.md index 9a729ca9..015c70e5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 2.5.4 +* `FIX` [#848](https://github.com/sumneko/lua-language-server/issues/848) + ## 2.5.3 `2021-12-6` * `FIX` [#842](https://github.com/sumneko/lua-language-server/issues/844) diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua index 187de9b3..048e1f69 100644 --- a/script/parser/newparser.lua +++ b/script/parser/newparser.lua @@ -1649,11 +1649,13 @@ local function parseTable() wantSep = true local tindex = parseIndex() skipSpace() + tindex.type = 'tableindex' + tindex.parent = tbl + index = index + 1 + tbl[index] = tindex if expectAssign() then skipSpace() local ivalue = parseExp() - tindex.type = 'tableindex' - tindex.parent = tbl if ivalue then ivalue.parent = tindex tindex.finish = ivalue.finish @@ -1661,8 +1663,6 @@ local function parseTable() else missExp() end - index = index + 1 - tbl[index] = tindex else missSymbol '=' end |