From 304006115543ff5fe5a6d4e777e20013b0e20c91 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, 4 Jan 2021 16:43:52 +0800 Subject: new folding --- script/parser/grammar.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'script/parser/grammar.lua') diff --git a/script/parser/grammar.lua b/script/parser/grammar.lua index f222a283..b9628f3f 100644 --- a/script/parser/grammar.lua +++ b/script/parser/grammar.lua @@ -88,9 +88,9 @@ end grammar 'Comment' [[ Comment <- LongComment / '--' ShortComment -LongComment <- ('--[' {} {:eq: '='* :} {} '[' +LongComment <- ({} '--[' {} {:eq: '='* :} {} '[' {(!CommentClose .)*} - (CommentClose / {})) + ((CommentClose / %nil) {})) -> LongComment / ( {} '/*' {} @@ -98,7 +98,7 @@ LongComment <- ('--[' {} {:eq: '='* :} {} '[' {} '*/' {} ) -> CLongComment -CommentClose <- ']' =eq ']' +CommentClose <- {']' =eq ']'} ShortComment <- ({} {(!%nl .)*} {}) -> ShortComment ]] -- cgit v1.2.3