From daee93fb17e8f206e63ab8573566762011a3f1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 28 Jun 2019 15:01:16 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9enum=E7=9A=84=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/parser/grammar.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/src/parser/grammar.lua') 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* -- cgit v1.2.3