| 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 | const elt = this.parseExprListItem( |
| 1113 | tt.parenR, |
| 1114 | false, |
| 1115 | refExpressionErrors, |
| 1116 | allowPlaceholder, |
| 1117 | ); |
| 1118 | // On invalid input `import(,)` and errorRecovery mode, |
| 1119 | // the parser will crash if we leave a hole here |
| 1120 | if (elt !== null) elts.push(elt); |
| 1121 | } |
| 1122 | |
| 1123 | return elts; |
| 1124 | } |
| 1125 | |
| 1126 | parseAsyncArrowHead( |
| 1127 | startLoc: Position, |