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

Function parseCallExpressionArguments

packages/babel-parser/src/parser/expression.ts:1089–1123  ·  view source on GitHub ↗
(
    this: Parser,
    allowPlaceholder?: boolean,
    nodeForExtra?: Undone<N.Node> | null,
    refExpressionErrors?: ExpressionErrors | null,
  )

Source from the content-addressed store, hash-verified

1087 }
1088
1089 parseCallExpressionArguments(
1090 this: Parser,
1091 allowPlaceholder?: boolean,
1092 nodeForExtra?: Undone<N.Node> | null,
1093 refExpressionErrors?: ExpressionErrors | null,
1094 ): (N.Expression | N.SpreadElement)[] {
1095 const elts: N.Expression[] = [];
1096 let first = true;
1097
1098 while (!this.eat(tt.parenR)) {
1099 if (first) {
1100 first = false;
1101 } else {
1102 this.expect(tt.comma);
1103 if (this.match(tt.parenR)) {
1104 if (nodeForExtra) {
1105 this.addTrailingCommaExtraToNode(nodeForExtra);
1106 }
1107 this.next();
1108 break;
1109 }
1110 }
1111
1112 elts.push(
1113 this.parseExprListItem(
1114 tt.parenR,
1115 false,
1116 refExpressionErrors,
1117 allowPlaceholder,
1118 ),
1119 );
1120 }
1121
1122 return elts;
1123 }
1124
1125 parseAsyncArrowHead(
1126 startLoc: Position,

Callers

nothing calls this directly

Calls 3

matchMethod · 0.80
nextMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected