summaryrefslogtreecommitdiff
path: root/server/src/parser/grammar.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-28 15:01:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-28 15:01:16 +0800
commitdaee93fb17e8f206e63ab8573566762011a3f1cd (patch)
tree899636477d8afb30b7dbfe995ef9fa8a76239919 /server/src/parser/grammar.lua
parentf6a6e9f9d36d34c542c721db41a4e9770bcebcf7 (diff)
downloadlua-language-server-daee93fb17e8f206e63ab8573566762011a3f1cd.zip
修改enum的语法
Diffstat (limited to 'server/src/parser/grammar.lua')
-rw-r--r--server/src/parser/grammar.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index c53597dd..2967ac3c 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -558,8 +558,10 @@ EmmyTypeName <- EmmyFunctionType
/ EmmyTableType
/ EmmyArrayType
/ MustEmmyName
-EmmyTypeEnum <- %s* (%nl %s* '---')? '|' %s* (String EmmyOption)
+EmmyTypeEnum <- %s* (%nl %s* '---')? '|' EmmyEnum
-> EmmyTypeEnum
+EmmyEnum <- %s* {'>'?} %s* String (EmmyEnumComment / (!%nl !'|' .)*)
+EmmyEnumComment <- %s* '#' %s* {(!%nl .)*}
EmmyAlias <- MustEmmyName %s* EmmyType EmmyTypeEnum*