-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement runtime support #3
Comments
Is this still the latest on this issue? Named capture groups would be a game changer for me, and I can try to find time to work on this if it's still the preferred strategy. |
@mike-marcacci, yes, would be great to add this, and I agree, actual usage of the groups is a game changer. We can discuss any strategy here, those described above are just an example, I'm happy to consider any alternatives you have. And of course I'll appreciate a PR. CC @nicolo-ribaudo who was trying to add a PR to Babel, but the babel/babel#7105 PR itself seems stuck there forever, so we can add it here. |
Yeah sorry, currently I'm working on decorators which are a more requested feature. I will revisit that PR after them. |
As the comments says, a transform can accept
includeRuntime
option (which is currently disabled).If the option is passed, regexes are wrapped into
RegExpTree
wrapper, and provide extra functionality at runtime (e.g. accessing captured named groups on matched result).The runtime implementation already exists, we need to pull it into a separate package, which can be auto-required by the transform.
Is translated into:
The text was updated successfully, but these errors were encountered: