regexp-tree icon indicating copy to clipboard operation
regexp-tree copied to clipboard

Support the `v` flag

Open slevithan opened this issue 1 year ago • 2 comments

ES2024's v flag (unicodeSets, an upgrade to flag u) has been supported since Node.js 20 and 2023-era browsers. Currently, regexp-tree cannot parse the v flag, and as far as I know it can't parse any v-only syntax (nested character classes, set subtraction/intersection, properties of strings, \q{…}, etc.).

Using v is a best practice, so not supporting it makes it much harder to use regexp-tree in tools that want to offer support for modern JS regexes.

slevithan avatar Aug 09 '24 16:08 slevithan

@slevithan thanks, this makes sense - I'll appreciate a PR for this issue!

DmitrySoshnikov avatar Aug 13 '24 23:08 DmitrySoshnikov

Unfortunately, I don't expect to be able to submit a PR for this due to other priorities and the fact that it's probably a significant body of work. That said, I'm open to submitting PRs for other issues in the future, especially if v is supported, making regexp-tree a strong foundation to continue using and building on.

Flag v is a collection of features that will meaningfully change the AST, and I think it will be better if someone familiar with regexp-tree's internals tackles it.

slevithan avatar Aug 14 '24 07:08 slevithan