Skip to content
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

Normative: allow named capture groups in Annex B non-u regex grammar #2729

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Apr 9, 2022

Fixes #1673.

Capturing group names were introduced in #1673, in both u and non-u regexes, but the alternate grammar for regexes in Annex B (i.e., the actual grammar for regexes) replaces in non-u regexes the nonterminal (Atom) which derives GroupSpecifier, and that PR neglected to update the new nonterminal (ExtendedAtom). This PR corrects that oversight.

I've marked this as a normative change rather than editorial because the current spec is, technically, coherent. However, the current spec does not match committee intent or web reality, so in my view we can land this without asking for consensus.

@bakkot bakkot added normative change Affects behavior required to correctly evaluate some ECMAScript source text spec bug labels Apr 9, 2022
spec.html Outdated Show resolved Hide resolved
@bakkot bakkot added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Apr 20, 2022
@bakkot bakkot force-pushed the fix-annex-b-named-capturing-groups branch from 847430c to f0c9031 Compare April 20, 2022 22:34
@ljharb ljharb force-pushed the fix-annex-b-named-capturing-groups branch from f0c9031 to 918e0e9 Compare April 20, 2022 22:44
@ljharb ljharb merged commit 918e0e9 into main Apr 20, 2022
@ljharb ljharb deleted the fix-annex-b-named-capturing-groups branch April 20, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
normative change Affects behavior required to correctly evaluate some ECMAScript source text ready to merge Editors believe this PR needs no further reviews, and is ready to land. spec bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug? re named groups in Annex B
5 participants