summaryrefslogtreecommitdiff
path: root/server/src/parser/grammar.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-05 20:38:25 +0800
committersumneko <sumneko@hotmail.com>2019-05-05 20:38:25 +0800
commitc1902bfe0f61006bd9afae43c10ee6a25863e5f6 (patch)
treee11e3cd65ad9109aa878a60e713d8b1d609858d1 /server/src/parser/grammar.lua
parentd64ec162e683c42befb2d32ae31b024e4d4a5510 (diff)
downloadlua-language-server-c1902bfe0f61006bd9afae43c10ee6a25863e5f6.zip
更新语法解析
Diffstat (limited to 'server/src/parser/grammar.lua')
-rw-r--r--server/src/parser/grammar.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index 28e3eb28..25ac30f2 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -541,15 +541,15 @@ EmmyClass <- (MustEmmyName EmmyParentClass?)
EmmyParentClass <- %s* {} ':' %s* MustEmmyName
EmmyType <- EmmyFunctionType
- / EmmyArrayType
/ EmmyTableType
+ / EmmyArrayType
/ EmmyCommonType
EmmyCommonType <- EmmyTypeNames
-> EmmyCommonType
EmmyTypeNames <- EmmyTypeName (%s* {} '|' %s* !String EmmyTypeName)*
EmmyTypeName <- EmmyFunctionType
- / EmmyArrayType
/ EmmyTableType
+ / EmmyArrayType
/ MustEmmyName
EmmyTypeEnums <- %s* '|' %s* String
@@ -580,7 +580,7 @@ EmmyArrayType <- (MustEmmyName '[]')
EmmyTableType <- ({} 'table' Cut '<' %s* EmmyType %s* ',' %s* EmmyType %s* '>' {})
-> EmmyTableType
-EmmyFunctionType<- ('fun' Cut %s* EmmyFunctionArgs? %s* EmmyFunctionRtn?)
+EmmyFunctionType<- ({} 'fun' Cut %s* EmmyFunctionArgs? %s* EmmyFunctionRtn? {})
-> EmmyFunctionType
EmmyFunctionArgs<- '(' %s* EmmyFunctionArg %s* (',' %s* EmmyFunctionArg %s*)* ')'
EmmyFunctionRtn <- ':' %s* EmmyType