tree-sitter-regex icon indicating copy to clipboard operation
tree-sitter-regex copied to clipboard

feat: Add unicode character escapes

Open ekorchmar opened this issue 9 months ago • 0 comments

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 the entire complexity of parsing regexs with "Unicode" mode enabled (see trailing and heading surrogates), but it approximates general use-case. Arguably, Regex in unicode parsing mode must be treated as a strictly different incompatible syntax and it's elements should not be included in this parser as a consideration; javascript parsers (including tree-sitter-javascript) should in turn defer regex parsing to different parsers depending on flags.

ekorchmar avatar May 26 '24 14:05 ekorchmar