Skip to content

Commit

Permalink
LegacyNonOctalEscapeSequence is syntax error in strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Aug 4, 2020
1 parent d95497d commit 5cd828a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions acorn/src/tokenize.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,12 @@ pp.readEscapedChar = function(inTemplate) {
return ""
case 56:
case 57:
if (this.strict) {
this.invalidStringToken(
this.pos - 1,
"Invalid escape sequence"
)
}
if (inTemplate) {
const codePos = this.pos - 1

Expand Down
2 changes: 0 additions & 2 deletions bin/test262.whitelist
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
language/literals/string/legacy-non-octal-escape-sequence-8-strict.js (strict mode)

language/expressions/await/await-BindingIdentifier-in-global.js (default)
language/expressions/await/await-BindingIdentifier-in-global.js (strict mode)
language/expressions/await/await-in-global.js (default)
Expand Down

0 comments on commit 5cd828a

Please sign in to comment.