diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-31 11:11:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-31 11:11:59 +0800 |
commit | bf8399c9057927d6746b47915a7b79c62d1082bd (patch) | |
tree | 08b6258daddc8307e98308128e404d4b9b29bb33 /server/src/parser/grammar.lua | |
parent | 0245eb9245d7ff8509822f5b505d542b925b6c7e (diff) | |
download | lua-language-server-bf8399c9057927d6746b47915a7b79c62d1082bd.zip |
更新语法检查
Diffstat (limited to 'server/src/parser/grammar.lua')
-rw-r--r-- | server/src/parser/grammar.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index bee5d8e1..a840a7a0 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -75,6 +75,7 @@ local function errorpos(pos, err) return { type = 'UNKNOWN', start = pos, + finish = pos, err = err, } end @@ -193,7 +194,7 @@ TOCLOSE <- Sp '*toclose' DirtyAssign <- ASSIGN / {} -> MissAssign DirtyBR <- BR / {} -> MissBR DirtyTR <- TR / {} -> MissTR -DirtyPR <- TR / {} -> MissPR +DirtyPR <- PR / {} -> MissPR ]] grammar 'Nil' [[ @@ -288,14 +289,13 @@ Suffix <- DOT MustName / Sp ({} Table {}) -> Call / Sp ({} String {}) -> Call / Sp ({} BL DirtyExp (BR / Sp) {}) -> Index - / Sp ({} PL ExpList (PR / Sp) {}) -> Call + / Sp ({} PL ExpList DirtyPR {}) -> Call DirtyExp <- Exp / {} -> DirtyExp -ExpList <- (COMMA DirtyExp)+ - -> List - / (Exp (COMMA DirtyExp)*)? - -> List +ExpList <- Sp ({} (!%nl (COMMA {} / Exp))+ {}) + -> ExpList + / %nil NameList <- (COMMA MustName)+ -> List / (Name (COMMA MustName)*) |