summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-30 19:33:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-30 19:33:18 +0800
commitf54c4c7d5c351111eed4c12e61394c49328e8721 (patch)
tree8b228a4edbce859eba6017989a5f4d6c22d7675a /server/src
parent6bb4eb555a8dae41da178f8fcec2e32b31848bda (diff)
downloadlua-language-server-f54c4c7d5c351111eed4c12e61394c49328e8721.zip
更新语法检查
Diffstat (limited to 'server/src')
-rw-r--r--server/src/parser/grammar.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index 051ab446..bee5d8e1 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -326,14 +326,13 @@ TableFields <- TableField
(TableAfterF)+
LastTableSep?
TableAfterF <- TableSep !TR TableField
- / DirtyInTable
+ / Sp ({} {(!TR !COMMA !SEMICOLON !Word !BL .)+})
+ -> UnknownSymbol
TableSep <- COMMA / SEMICOLON
/ {}
-> MissTableSep
LastTableSep<- COMMA / SEMICOLON
-TableField <- DirtyInTable? (NewIndex / NewField / Exp)
-DirtyInTable<- Sp ({} {(!TR !COMMA !SEMICOLON !Word !BL !PL !TL !DOTS .)+})
- -> UnknownSymbol
+TableField <- NewIndex / NewField / Exp
NewIndex <- (BL DirtyExp DirtyBR DirtyAssign DirtyExp)
-> NewIndex
NewField <- (MustName ASSIGN DirtyExp)