(
this: Parser,
expr: N.Expression,
startLoc: Position,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
refExpressionErrors?: ExpressionErrors | null,
)
| 424 | } |
| 425 | |
| 426 | parseConditional( |
| 427 | this: Parser, |
| 428 | expr: N.Expression, |
| 429 | startLoc: Position, |
| 430 | // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 431 | refExpressionErrors?: ExpressionErrors | null, |
| 432 | ): N.Expression { |
| 433 | if (this.eat(tt.question)) { |
| 434 | const node = this.startNodeAt<N.ConditionalExpression>(startLoc); |
| 435 | node.test = expr; |
| 436 | node.consequent = this.parseMaybeAssignAllowIn(); |
| 437 | this.expect(tt.colon); |
| 438 | node.alternate = this.parseMaybeAssign(); |
| 439 | return this.finishNode(node, "ConditionalExpression"); |
| 440 | } |
| 441 | return expr; |
| 442 | } |
| 443 | |
| 444 | parseMaybeUnaryOrPrivate( |
| 445 | this: Parser, |
nothing calls this directly
no test coverage detected