diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 16:02:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 16:02:05 +0800 |
commit | 0c5c97f10baba4cfbfb2f7e7de3503ff239004ba (patch) | |
tree | 3c3790f7bf11b4df71506fe507f92e2e189458b6 /server | |
parent | 195ed853f29255beea4a1a008db42615b57b7d22 (diff) | |
download | lua-language-server-0c5c97f10baba4cfbfb2f7e7de3503ff239004ba.zip |
更新语法解析
Diffstat (limited to 'server')
-rw-r--r-- | server/src/parser/ast.lua | 4 | ||||
-rw-r--r-- | server/src/parser/grammar.lua | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index 45a0cbee..0b3e369a 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -119,6 +119,10 @@ local defs = { } return obj end, + DirtyCall = function (obj) + obj.dirty = true + return obj + end, Binary = function (...) local e1, op = ... if not op then diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index 942c23fc..d7464e5b 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -268,7 +268,8 @@ Suffix <- DOT MustName / Sp ({} Table {}) -> Call / Sp ({} String {}) -> Call / BL Exp -> Index BR - / Sp ({} PL ExpList PR? {}) -> Call + / Sp ({} PL ExpList PR {}) -> Call + / Sp ({} PL ExpList {}) -> Call -> DirtyCall DirtyExp <- Exp / DirtyName ExpList <- (COMMA DirtyExp)+ |