~rockorager/tree-sitter-hare

d7019d3552ce534310dcda62d824a711d995f041 — Tim Culverhouse 1 year, 6 months ago a2c99bc
add true, false, null, void constants
1 files changed, 9 insertions(+), 4 deletions(-)

M grammar.js
M grammar.js => grammar.js +9 -4
@@ 316,12 316,17 @@ module.exports = grammar({
        $.floating_constant,
        $.rune_constant,
        $.string_constant,
        "true",
        "false",
        "null",
        "void",
        $.true,
        $.false,
        $.null,
        $.void,
      ),

    true: ($) => token("true"),
    false: ($) => token("false"),
    null: ($) => token("null"),
    void: ($) => token("void"),

    integer_constant: ($) =>
      choice(
        token(seq("0x", hexDigit, optional(integerSuffix))),