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

Function parseExprOpRightExpr

packages/babel-parser/src/parser/expression.ts:587–608  ·  view source on GitHub ↗
(
    this: Parser,
    op: TokenType,
    prec: number,
  )

Source from the content-addressed store, hash-verified

585 // operator expressions, then apply any operator-specific functions.
586
587 parseExprOpRightExpr(
588 this: Parser,
589 op: TokenType,
590 prec: number,
591 ): N.Expression {
592 switch (op) {
593 case tt.pipeline:
594 switch (this.getPluginOption("pipelineOperator", "proposal")) {
595 case "hack":
596 return this.withTopicBindingContext(() => {
597 return this.parseHackPipeBody();
598 });
599
600 case "fsharp":
601 return this.parseFSharpPipelineBody(prec);
602 }
603
604 // Falls through.
605 default:
606 return this.parseExprOpBaseRightExpr(op, prec);
607 }
608 }
609
610 // Helper function for `parseExprOpRightExpr`. Parse the right-hand side of
611 // binary-operator expressions without applying any operator-specific functions.

Callers

nothing calls this directly

Calls 1

getPluginOptionMethod · 0.80

Tested by

no test coverage detected