add char support
@@ -121,6 +121,7 @@ module.exports = grammar({
$.string,
$.tuple,
$.literal,
+ $.char,
$.identifier,
),
@@ -330,6 +331,7 @@ module.exports = grammar({
module: $ => /[A-Z][_a-zA-Z0-9]*(\.[A-Z][_a-zA-Z0-9]*)*/,
comment: $ => token(prec(PREC.COMMENT, seq('#', /.*/))),
_terminator: $ => prec.right(atleastOnce(choice($._line_break, ';'))),
- literal: $ => choice('true', 'false', 'nil')
+ literal: $ => choice('true', 'false', 'nil'),
+ char: $ => /\?(.|\\.)/,
}
})
