diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-22 10:48:21 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-22 10:48:21 +0800 |
commit | 14a49faa67e15b2b10fb7aa798bb541dec201d88 (patch) | |
tree | acb4db0cd411021026c206cd77052cfbff065514 | |
parent | 4ecc68582dfc3db72fb66b5ae5405e18ba0c6a4f (diff) | |
download | lua-language-server-14a49faa67e15b2b10fb7aa798bb541dec201d88.zip |
fix #458
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/parser/ast.lua | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md index 28e43712..e1c95a22 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,8 @@ # changelog ## 1.19.1 -* `FIX` `LuaDoc`: parsing resumes may wrong +* `FIX` `LuaDoc`: parsing resumes may wrong* +* `FIX` [#458](https://github.com/sumneko/lua-language-server/issues/458) * `FIX` runtime errors ## 1.19.0 diff --git a/script/parser/ast.lua b/script/parser/ast.lua index bb42cc0f..45801cf6 100644 --- a/script/parser/ast.lua +++ b/script/parser/ast.lua @@ -654,6 +654,7 @@ local Defs = { GetIndex = function (start, index, finish) local obj = { type = 'getindex', + bstart = start, start = start, finish = finish - 1, index = index, @@ -1021,8 +1022,8 @@ local Defs = { name.value = actions PushError { type = 'INDEX_IN_FUNC_NAME', - start = name.index.start, - finish = name.index.finish, + start = name.bstart, + finish = name.finish, } end name.range = actions.finish |