diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-28 16:10:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-28 16:10:14 +0800 |
commit | 13a9025d969bc416cd4c1057865448812f00e00b (patch) | |
tree | 3e13cea336e510d183c817b6a7af89ae2228c882 /server/src/parser/grammar.lua | |
parent | d544fa45c903bbc479ae383e3626940316134ba1 (diff) | |
download | lua-language-server-13a9025d969bc416cd4c1057865448812f00e00b.zip |
#101 --- 和 @ 之间可以有空格
Diffstat (limited to 'server/src/parser/grammar.lua')
-rw-r--r-- | server/src/parser/grammar.lua | 10 |
1 files changed, 6 insertions, 4 deletions
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 |