tree-sitter-regex
tree-sitter-regex copied to clipboard
Tree-sitter parser for regular expressions
This PR allow underscore in the named capturing group to fix the highlighting issue in Zed. This is a small changes so I update the existing tests for it. Please...
Adresses issue #27 Assumption is made that pattern like \u{DEDBEF} always represents intent to escape a unicode character, as we are unable to access flags context. This does not accomodate...
Consider this javascript regexp, containing [unicode codepoint escapes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Character_escape#uhhhh): ```js const RE = /[\u005D-\uFFFF]/; ``` Which parses up like: ```lisp (program ; [0, 0] - [1, 0] (lexical_declaration ; [0, 0]...
I don't know if POSIX regexp is in scope of this parser, but the patterns with character classes have errors. Example regex: `[[:alnum:]]+`: ```lisp (pattern ; [0, 0] - [1,...
Prior to this change a character class such as `[0-1]` was parsed as: ``` (character_class) ([) (character_class) (character_class) (character_class) (]) ``` So the range was completely dropped. This happened for...
### Describe the bug When trying to edit certain regexes, nvim started hanging on me with 100% CPU usage. ### To Reproduce I've minified the regex to the minimum amount...