diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/parser/ast.lua | 2 | ||||
-rw-r--r-- | server/src/parser/grammar.lua | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index e2add23e..f9a6d53d 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -1316,7 +1316,7 @@ local Defs = { EmmyComment = function (...) return { type = 'emmyComment', - [1] = table.concat({...}, ' '), + [1] = table.concat({...}), } end, EmmyOption = function (options) diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua index 5a408d90..c53597dd 100644 --- a/server/src/parser/grammar.lua +++ b/server/src/parser/grammar.lua @@ -517,9 +517,11 @@ grammar 'Emmy' [[ Emmy <- EmmySp '---@' EmmyBody ShortComment / EmmyComments EmmySp <- (!'---@' !'---' Comment / %s / %nl)* -EmmyComments <- (EmmyComment (%nl EmmyComment)*) +EmmyComments <- (EmmyComment (%nl EmmyComMulti / %nl EmmyComSingle)*) -> EmmyComment -EmmyComment <- EmmySp '---' !'@' %s* {(!%nl .)*} +EmmyComment <- EmmySp '---' !'@' %s* {(!%nl .)*} +EmmyComMulti <- EmmySp '---|' {} -> en {(!%nl .)*} +EmmyComSingle <- EmmySp '---' !'@' %s* {} -> ' ' {(!%nl .)*} EmmyBody <- 'class' %s+ EmmyClass -> EmmyClass / 'type' %s+ EmmyType -> EmmyType / 'alias' %s+ EmmyAlias -> EmmyAlias |