MCPcopy Create free account
hub / github.com/babel/babel / parseMaybeConditional

Function parseMaybeConditional

packages/babel-parser/src/parser/expression.ts:412–424  ·  view source on GitHub ↗
(
    this: Parser,
    refExpressionErrors: ExpressionErrors,
  )

Source from the content-addressed store, hash-verified

410 // https://tc39.es/ecma262/#prod-ConditionalExpression
411
412 parseMaybeConditional(
413 this: Parser,
414 refExpressionErrors: ExpressionErrors,
415 ): N.Expression {
416 const startLoc = this.state.startLoc;
417 const expr = this.parseExprOps(refExpressionErrors);
418
419 if (this.shouldExitDescending(expr)) {
420 return expr;
421 }
422
423 return this.parseConditional(expr, startLoc, refExpressionErrors);
424 }
425
426 parseConditional(
427 this: Parser,

Callers

nothing calls this directly

Calls 1

parseConditionalMethod · 0.45

Tested by

no test coverage detected