diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-30 10:55:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-30 10:55:10 +0800 |
commit | 624c1ddbffafef38b797f181fbcca000b293b60b (patch) | |
tree | c5d430d1c289fc23c635c99e5b99afe56f31b00e /server/src/parser/grammar.lua | |
parent | 5c7f8776c839bc6898953affb0d94ec99e435cd8 (diff) | |
download | lua-language-server-624c1ddbffafef38b797f181fbcca000b293b60b.zip |
修正多行Emmy注释的bug
Diffstat (limited to 'server/src/parser/grammar.lua')
-rw-r--r-- | server/src/parser/grammar.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index 5aa5d14c..3525677a 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -515,14 +515,13 @@ Emmy <- '---@' ]] grammar 'Emmy' [[ -Emmy <- EmmySp '---' %s* - ( '@' EmmyBody ShortComment - / EmmyComments - ) +Emmy <- EmmyAction + / EmmyComments +EmmyAction <- EmmySp '---' %s* '@' EmmyBody ShortComment EmmySp <- (!'---' Comment / %s / %nl)* EmmyComments <- EmmyComment+ -> EmmyComment -EmmyComment <- {(!%nl .)+} +EmmyComment <- EmmySp '---' %s* !'@' {(!%nl .)*} EmmyBody <- 'class' %s+ EmmyClass -> EmmyClass / 'type' %s+ EmmyType -> EmmyType / 'alias' %s+ EmmyAlias -> EmmyAlias |