~rockorager/tree-sitter-scfg

02712d3b62548a0559075555830d6531d9f047df — Tim Culverhouse 10 months ago 87fcf87
comment: allow quotes in comments

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2 files changed, 3 insertions(+), 4 deletions(-)

M corpus/scfg.txt
M grammar.js
M corpus/scfg.txt => corpus/scfg.txt +2 -3
@@ 16,13 16,12 @@ name param
Comment
================================================================================

# comment
# comment has "" quotes it's
name param

--------------------------------------------------------------------------------
    (config
      (comment
        (word))
      (comment)
      (directive
        (directive_name
          (word))

M grammar.js => grammar.js +1 -1
@@ 18,7 18,7 @@ module.exports = grammar({

    _line: ($) => choice($.comment, $.directive),

    comment: ($) => seq("#", repeat($.word), $._newline),
    comment: ($) => seq("#", repeat(VCHAR), $._newline),

    directive: ($) =>
      seq(