Skip to content

Commit

Permalink
fix: move optional-chaining out of next
Browse files Browse the repository at this point in the history
Optional-chaining is in ECMA262 spec now.

closes #117
  • Loading branch information
3cp committed Oct 25, 2020
1 parent df5bdaa commit 7504c64
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 132 deletions.
1 change: 0 additions & 1 deletion src/lexer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ export function scanSingleToken(parser: ParserState, context: Context, state: Le
// `?`, `??`, `?.`
case Token.QuestionMark: {
let ch = advanceChar(parser);
if ((context & Context.OptionsNext) < 1) return Token.QuestionMark;
if (ch === Chars.QuestionMark) {
advanceChar(parser);
return Token.Coalesce;
Expand Down

0 comments on commit 7504c64

Please sign in to comment.