summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-22 10:48:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-22 10:48:21 +0800
commit14a49faa67e15b2b10fb7aa798bb541dec201d88 (patch)
treeacb4db0cd411021026c206cd77052cfbff065514 /script/parser
parent4ecc68582dfc3db72fb66b5ae5405e18ba0c6a4f (diff)
downloadlua-language-server-14a49faa67e15b2b10fb7aa798bb541dec201d88.zip
fix #458
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/ast.lua5
1 files changed, 3 insertions, 2 deletions
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