Skip to content

Commit

Permalink
fix(parser): fixed issue with 'yield expr'
Browse files Browse the repository at this point in the history
  • Loading branch information
KFlash committed Jan 9, 2021
1 parent 5b7a592 commit 5cd7c1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3557,7 +3557,7 @@ export function parseYieldExpression(

if ((parser.flags & Flags.NewLine) < 1) {
delegate = consumeOpt(parser, context | Context.AllowRegExp, Token.Multiply);
if (parser.token & Token.IsExpressionStart || delegate) {
if (parser.token & (Token.Contextual | Token.IsExpressionStart) || delegate) {
argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
}
}
Expand Down

0 comments on commit 5cd7c1d

Please sign in to comment.