(
node: Undone<T>,
optional: boolean,
)
| 1066 | } |
| 1067 | |
| 1068 | finishCallExpression<T extends N.CallExpression | N.OptionalCallExpression>( |
| 1069 | node: Undone<T>, |
| 1070 | optional: boolean, |
| 1071 | ): T { |
| 1072 | if (node.callee.type === "Import") { |
| 1073 | if (node.arguments.length === 0 || node.arguments.length > 2) { |
| 1074 | this.raise(Errors.ImportCallArity, node); |
| 1075 | } else { |
| 1076 | for (const arg of node.arguments) { |
| 1077 | if (arg.type === "SpreadElement") { |
| 1078 | this.raise(Errors.ImportCallSpreadArgument, arg); |
| 1079 | } |
| 1080 | } |
| 1081 | } |
| 1082 | } |
| 1083 | return this.finishNode( |
| 1084 | node, |
| 1085 | optional ? "OptionalCallExpression" : "CallExpression", |
| 1086 | ); |
| 1087 | } |
| 1088 | |
| 1089 | parseCallExpressionArguments( |
| 1090 | this: Parser, |
nothing calls this directly
no test coverage detected