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: Specify \8 and \9 in sloppy non-template strings. #2054

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

rkirsling
Copy link
Member

@rkirsling rkirsling commented Jun 16, 2020

Resolves #2039.

Specifically:

  • (Untagged) templates already have early errors for `\8` and `\9` so no action is needed there.
  • All engines agree that '\8' and '\9' are just '8' and '9' in sloppy mode, so specify that in B.1.2.
  • JSC has never(?) supported '\8' and '\9' in strict mode, so there should be no web compatibility risk.

Tests: tc39/test262#2654

spec.html Outdated
@@ -42121,15 +42122,15 @@ <h2>Syntax</h2>

FourToSeven :: one of
`4` `5` `6` `7`

NonOctalDecimalEscapeSequence :: one of
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just be an alias for NonOctalDigit, but I think SV would be less clean to specify that way? Feel free to correct me though.

@rkirsling rkirsling changed the title Specify \8 and \9 in sloppy non-template strings. Normative: Specify \8 and \9 in sloppy non-template strings. Jun 17, 2020
spec.html Outdated Show resolved Hide resolved
@ljharb ljharb added has test262 tests needs consensus This needs committee consensus before it can be eligible to be merged. normative change Affects behavior required to correctly evaluate some ECMAScript source text web reality has consensus This has committee consensus. and removed needs consensus This needs committee consensus before it can be eligible to be merged. labels Jul 16, 2020
@ljharb ljharb requested review from syg, bakkot and a team July 20, 2020 18:34
@ljharb ljharb self-assigned this Jul 29, 2020
@ljharb ljharb requested a review from a team July 29, 2020 19:15
@ljharb ljharb merged commit 7efaa50 into tc39:master Jul 30, 2020
pull bot pushed a commit to Alan-love/v8 that referenced this pull request Aug 3, 2020
This reached consensus in the July 2020 TC39:
tc39/ecma262#2054

Bug: v8:10769
Change-Id: Iecea1d9d9c9be5c2fbfb820aed2285719c4e6382
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2333350
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69206}
@rkirsling rkirsling deleted the sloppy-noctal-escapes branch September 4, 2020 20:25
jmdyck added a commit to jmdyck/test262-parser-tests that referenced this pull request Jan 30, 2021
These tests were expected to raise a syntax error
because they have a string literal containing \8 or \9,
which used to be disallowed.

However, they have been allowed (via NonOctalDecimalEscapeSequence)
since the merge of tc39/ecma262#2054.
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. has test262 tests normative change Affects behavior required to correctly evaluate some ECMAScript source text web reality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\8 in sloppy non-template strings remains unspecified
5 participants