diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/parser/ast.lua | 6 | ||||
-rw-r--r-- | script/parser/grammar.lua | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/script/parser/ast.lua b/script/parser/ast.lua index 38c4e51b..3ac4d27f 100644 --- a/script/parser/ast.lua +++ b/script/parser/ast.lua @@ -277,7 +277,7 @@ local Defs = { type = 'comment.long', start = start, finish = finish - 1, - text = '', + text = str, } if not close then local endSymbol = ']' .. ('='):rep(afterEq-beforeEq) .. ']' @@ -318,7 +318,7 @@ local Defs = { } end end, - CLongComment = function (start1, finish1, start2, finish2) + CLongComment = function (start1, finish1, str, start2, finish2) if State.options.nonstandardSymbol and State.options.nonstandardSymbol['/**/'] then else PushError { @@ -344,7 +344,7 @@ local Defs = { type = 'comment.clong', start = start1, finish = finish2 - 1, - text = '', + text = str, } end, CCommentPrefix = function (start, finish, commentFinish) diff --git a/script/parser/grammar.lua b/script/parser/grammar.lua index ea9a25e0..01756c2a 100644 --- a/script/parser/grammar.lua +++ b/script/parser/grammar.lua @@ -88,13 +88,13 @@ end grammar 'Comment' [[ Comment <- LongComment / '--' ShortComment -LongComment <- ({} '--[' {} {:eq: '='* :} {} '[' +LongComment <- ({} '--[' {} {:eq: '='* :} {} '[' %nl? {(!CommentClose .)*} ((CommentClose / %nil) {})) -> LongComment / ( - {} '/*' {} - (!'*/' .)* + {} '/*' {} %nl? + {(!'*/' .)*} {} '*/' {} ) -> CLongComment |