-
Notifications
You must be signed in to change notification settings - Fork 469
Closed
Labels
Description
(Note: this is purely about regex-syntax
being able to parse the syntax, and not about regex
supporting executing them in any manner.)
Specifically, I'd like to see regex-syntax
be able to parse the PCRE syntax of (?&name)
and/or (?P>name)
.
Concrete benefits:
regex
can recognize the syntax and say something along the lines of "subpattern recursion is not supported" and link the docs for why- Users of
regex-syntax
can implement?(DEFINE)
-like functionality, providing "subpatterns as subroutines" for more legible regexes, just replacing the recursion reference with a copy of the subpattern regex. (We're looking into doing this for logos, and I'd much prefer to avoid regex preprocessing.)
I'm happy to do the implementation work if this is something desirable; I'd just need to know where in the Ast
enum it'd be best to store this node kind.
sssooonnnggg