Skip to content

Commit

Permalink
fix(lexer): improved unicode escape scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
KFlash committed Aug 25, 2019
1 parent 1934295 commit 61c471b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexer/identifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function scanUnicodeEscape(parser: ParserState): number {
}

// At least 4 characters have to be read
if (codePoint < 1 || (parser.currentChar as number) !== Chars.RightBrace) {
if ((parser.currentChar as number) !== Chars.RightBrace) {
reportScannerError(begin, parser.line, parser.index - 1, Errors.InvalidHexEscapeSequence);
}
advanceChar(parser); // consumes '}'
Expand Down

0 comments on commit 61c471b

Please sign in to comment.