Skip to content

Commit

Permalink
Set in to true when parsing AssignmentExpression in ConditionalEx…
Browse files Browse the repository at this point in the history
…pression
  • Loading branch information
raskad committed Oct 26, 2022
1 parent 762dd93 commit 8994c26
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,9 @@ where
if let Some(tok) = cursor.peek(0, interner)? {
if tok.kind() == &TokenKind::Punctuator(Punctuator::Question) {
cursor.next(interner)?.expect("? character vanished"); // Consume the token.
let then_clause = AssignmentExpression::new(
None,
self.allow_in,
self.allow_yield,
self.allow_await,
)
.parse(cursor, interner)?;
let then_clause =
AssignmentExpression::new(None, true, self.allow_yield, self.allow_await)
.parse(cursor, interner)?;
cursor.expect(Punctuator::Colon, "conditional expression", interner)?;

let else_clause = AssignmentExpression::new(
Expand Down

0 comments on commit 8994c26

Please sign in to comment.