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 backreferences without u flag in core grammar #2436

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

mysticatea
Copy link
Contributor

@mysticatea mysticatea commented Jun 15, 2021

This PR fixes #2434.

In the core grammar, named backreferences have been syntax errors if no u flag. For example, /(?<foo>A)\k<foo>/ is a syntax error unless using Annex B.

This PR fixes that by moving two passes parsing to Annex B.

https://arai-a.github.io/ecma262-compare/?pr=2436&collapsed=1

@michaelficarra michaelficarra added normative change Affects behavior required to correctly evaluate some ECMAScript source text needs consensus This needs committee consensus before it can be eligible to be merged. labels Jun 23, 2021
@ljharb ljharb force-pushed the master branch 3 times, most recently from 3d0c24c to 7a79833 Compare June 29, 2021 02:21
@bakkot bakkot added the editor call to be discussed in the next editor call label Dec 16, 2022
@bakkot bakkot removed the editor call to be discussed in the next editor call label Jan 11, 2023
@ljharb ljharb requested review from syg, michaelficarra, bakkot and a team January 11, 2023 22:36
@michaelficarra michaelficarra removed the needs consensus This needs committee consensus before it can be eligible to be merged. label Jan 11, 2023
@bakkot bakkot added the has consensus This has committee consensus. label Jan 11, 2023
@syg syg added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Feb 15, 2023
@ljharb ljharb force-pushed the move-two-passes-parsing-to-annexb branch from 7579276 to f1d2851 Compare February 15, 2023 23:16
ljharb pushed a commit to mysticatea/ecma262 that referenced this pull request Feb 15, 2023
ljharb pushed a commit to ljharb/ecma262 that referenced this pull request Feb 15, 2023
@ljharb ljharb force-pushed the move-two-passes-parsing-to-annexb branch from f1d2851 to a06d0a7 Compare February 15, 2023 23:19
@ljharb ljharb force-pushed the move-two-passes-parsing-to-annexb branch from a06d0a7 to e7aba9a Compare February 15, 2023 23:23
@ljharb ljharb merged commit e7aba9a into tc39:main Feb 15, 2023
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Feb 16, 2023
Fixes bug from PR tc39#2436.

(The renaming happened in PR tc39#2411.)
ljharb pushed a commit to jmdyck/ecma262 that referenced this pull request Feb 17, 2023
Fixes bug from PR tc39#2436.

(The renaming happened in PR tc39#2411.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/(?<foo>A)\k<foo>/ is a syntax error unless using Annex B
5 participants