From 13a9025d969bc416cd4c1057865448812f00e00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 28 Oct 2019 16:10:14 +0800 Subject: =?UTF-8?q?#101=20---=20=E5=92=8C=20@=20=E4=B9=8B=E9=97=B4?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=9C=89=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/parser/grammar.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/src/parser/grammar.lua') diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index 636e08b0..5aa5d14c 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -515,12 +515,14 @@ Emmy <- '---@' ]] grammar 'Emmy' [[ -Emmy <- EmmySp '---@' EmmyBody ShortComment - / EmmyComments -EmmySp <- (!'---@' !'---' Comment / %s / %nl)* +Emmy <- EmmySp '---' %s* + ( '@' EmmyBody ShortComment + / EmmyComments + ) +EmmySp <- (!'---' Comment / %s / %nl)* EmmyComments <- EmmyComment+ -> EmmyComment -EmmyComment <- EmmySp '---' !'@' %s* {(!%nl .)*} +EmmyComment <- {(!%nl .)+} EmmyBody <- 'class' %s+ EmmyClass -> EmmyClass / 'type' %s+ EmmyType -> EmmyType / 'alias' %s+ EmmyAlias -> EmmyAlias -- cgit v1.2.3