tree-sitter-grammars / tree-sitter-query

TS query grammar for tree-sitter
Apache License 2.0
52 stars 14 forks source link

bug: "u{[0-9a-fA-F]+}" in grammar.json leads to regex parse error #32

Closed polyzen closed 7 months ago

polyzen commented 7 months ago

Did you check existing issues?

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

tree-sitter 0.22.2 (fc15f621334a262039ffaded5937e2844f88da61)

Describe the bug

tree-sitter generate --no-bindings src/grammar.json errors out with:

Error processing rule escape_sequence

Caused by:
    regex parse error:
        u{[0-9a-fA-F]+}
          ^
    error: repetition quantifier expects a valid decimal

Steps To Reproduce/Bad Parse Tree

  1. Clone repo
  2. Run tree-sitter generate --no-bindings src/grammar.json

Expected Behavior/Parse Tree

No error

Repro

No response