tree-sitter: Panic when a regex contains an invalid unicode code point

The attached file (after renaming to .js; github would not let me attach a .js!) gives an error:

tree-sitter generate /c/Projects/tree-sitter-ada/ada_annex_p.js thread ‘main’ panicked at ‘called Option::unwrap() on a None value’, cli\src\generate\nfa.rs:80:28

ada_annex_p.txt

I tried to run tree-sitter under gdb, but even using the target/debug executable, there are no debug symbols. I compiled tree-sitter from github master, on Mingw64.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Yeah, I’d like to add support for JavaScript’s \p{} syntax in regexes. I don’t think it should be too complex, and it would be useful in a number of grammars.