diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/parser/ast.lua | 10 | ||||
-rw-r--r-- | server/src/parser/grammar.lua | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index 77edeb5e..6de13aa4 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -85,18 +85,24 @@ local defs = { exp.index = true return exp end, - Call = function (arg) + Call = function (start, arg, finish) if arg == nil then return { - type = 'call' + type = 'call', + start = start, + finish = finish - 1, } end if arg.type == 'list' then arg.type = 'call' + arg.start = start + arg.finish = finish - 1 return arg end local obj = { type = 'call', + start = start, + finish = finish - 1, [1] = arg, } return obj diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index 0f533862..4c087024 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -261,10 +261,10 @@ Prefix <- PL Exp PR / Name Suffix <- DOT Name / COLON Name - / Table -> Call - / String -> Call + / Sp ({} Table {}) -> Call + / Sp ({} String {}) -> Call / BL Exp -> Index BR - / PL (ExpList -> Call) PR + / Sp ({} PL ExpList PR {}) -> Call ExpList <- (Exp (COMMA Exp)*)? -> List |