diff options
Diffstat (limited to 'server/src/parser/ast.lua')
-rw-r--r-- | server/src/parser/ast.lua | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index f361021b..5a3630cd 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -738,8 +738,8 @@ local Defs = { local last = args[max] pushError { type = 'MISS_NAME', - start = last, - finish = last, + start = last+1, + finish = last+1, } end if #list == 0 then @@ -1119,8 +1119,8 @@ local Defs = { pushError { type = 'MISS_NAME', level = 'warning', - start = pos-1, - finish = pos-1, + start = pos, + finish = pos, } return { type = 'emmyName', @@ -1177,11 +1177,14 @@ local Defs = { [2] = valueType, } end, - EmmyFunctionType = function (...) + EmmyFunctionType = function (start, ...) local result = { + start = start, type = 'emmyFunctionType', ... } + result.finish = result[#result] - 1 + result[#result] = nil return result end, EmmyAlias = function (name, emmyName, ...) @@ -1276,8 +1279,8 @@ local Defs = { DirtyName = function (pos) pushError { type = 'MISS_NAME', - start = pos-1, - finish = pos-1, + start = pos, + finish = pos, } return { type = 'name', |