summaryrefslogtreecommitdiff
path: root/script/parser/grammar.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-04 16:43:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-04 16:43:52 +0800
commit304006115543ff5fe5a6d4e777e20013b0e20c91 (patch)
tree1bca805746fffa4b3e119d8bfc78f5bf5f213b74 /script/parser/grammar.lua
parentfcf7e914ad6d43ee6953e68c8ab791da4e3f6302 (diff)
downloadlua-language-server-304006115543ff5fe5a6d4e777e20013b0e20c91.zip
new folding
Diffstat (limited to 'script/parser/grammar.lua')
-rw-r--r--script/parser/grammar.lua6
1 files changed, 3 insertions, 3 deletions
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
]]