Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions acorn/src/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ pp.isLet = function(context) {
if (context) return false

if (nextCh === 123) return true // '{'
if (isIdentifierStart(nextCh, true)) {
if (isIdentifierStart(nextCh)) {
let start = next
do { next += nextCh <= 0xffff ? 1 : 2 }
while (isIdentifierChar(nextCh = this.fullCharCodeAt(next), true))
while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)))
if (nextCh === 92) return true
let ident = this.input.slice(start, next)
if (!keywordRelationalOperator.test(ident)) return true
Expand All @@ -70,7 +70,7 @@ pp.isAsyncFunction = function() {
return !lineBreak.test(this.input.slice(this.pos, next)) &&
this.input.slice(next, next + 8) === "function" &&
(next + 8 === this.input.length ||
!(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after === 92 || after > 0xd7ff && after < 0xdc00))
!(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || after === 92 /* '\' */))
}

pp.isUsingKeyword = function(isAwaitUsing, isFor) {
Expand Down Expand Up @@ -98,7 +98,7 @@ pp.isUsingKeyword = function(isAwaitUsing, isFor) {
}

let ch = this.fullCharCodeAt(next)
if (!isIdentifierStart(ch, true) && ch !== 92 /* '\' */) return false
if (!isIdentifierStart(ch) && ch !== 92 /* '\' */) return false
let idStart = next
do { next += ch <= 0xffff ? 1 : 2 }
while (isIdentifierChar(ch = this.fullCharCodeAt(next)))
Expand Down