(
this: Parser,
node: Undone<N.ArrowFunctionExpression>,
params:
| (
| N.Expression
| N.SpreadElement
| N.VoidPattern
| N.AssignmentPattern
| N.ArgumentPlaceholder
| N.TypeCastExpression
| N.TSTypeCastExpression
)[]
| (
| N.Expression
| N.RestElement
| N.VoidPattern
| N.AssignmentPattern
| N.ArgumentPlaceholder
| N.TypeCastExpression
| N.TSTypeCastExpression
)[]
| null
| undefined,
isAsync: boolean,
trailingCommaLoc?: Position | null,
)
| 2409 | // If the parameters are provided, they will be converted to an |
| 2410 | // assignable list. |
| 2411 | parseArrowExpression( |
| 2412 | this: Parser, |
| 2413 | node: Undone<N.ArrowFunctionExpression>, |
| 2414 | params: |
| 2415 | | ( |
| 2416 | | N.Expression |
| 2417 | | N.SpreadElement |
| 2418 | | N.VoidPattern |
| 2419 | | N.AssignmentPattern |
| 2420 | | N.ArgumentPlaceholder |
| 2421 | | N.TypeCastExpression |
| 2422 | | N.TSTypeCastExpression |
| 2423 | )[] |
| 2424 | | ( |
| 2425 | | N.Expression |
| 2426 | | N.RestElement |
| 2427 | | N.VoidPattern |
| 2428 | | N.AssignmentPattern |
| 2429 | | N.ArgumentPlaceholder |
| 2430 | | N.TypeCastExpression |
| 2431 | | N.TSTypeCastExpression |
| 2432 | )[] |
| 2433 | | null |
| 2434 | | undefined, |
| 2435 | isAsync: boolean, |
| 2436 | trailingCommaLoc?: Position | null, |
| 2437 | ): N.ArrowFunctionExpression { |
| 2438 | this.scope.enter(ScopeFlag.FUNCTION | ScopeFlag.ARROW); |
| 2439 | let flags = functionFlags(isAsync, false); |
| 2440 | // ConciseBody[In] : |
| 2441 | // [lookahead ≠ {] ExpressionBody[?In, ~Await] |
| 2442 | // { FunctionBody[~Yield, ~Await] } |
| 2443 | if (!this.match(tt.braceL)) { |
| 2444 | flags |= |
| 2445 | this.prodParam.currentFlags() & |
| 2446 | (ParamKind.PARAM_IN | ParamKind.PARAM_NOT_FSHARP_PIPELINE_DIRECT_BODY); |
| 2447 | } |
| 2448 | this.prodParam.enter(flags); |
| 2449 | this.initFunction(node, isAsync); |
| 2450 | |
| 2451 | if (params) { |
| 2452 | this.setArrowFunctionParameters(node, params, trailingCommaLoc); |
| 2453 | } |
| 2454 | this.parseFunctionBody(node, true); |
| 2455 | |
| 2456 | this.prodParam.exit(); |
| 2457 | this.scope.exit(); |
| 2458 | |
| 2459 | return this.finishNode(node, "ArrowFunctionExpression"); |
| 2460 | } |
| 2461 | |
| 2462 | setArrowFunctionParameters( |
| 2463 | node: Undone<N.ArrowFunctionExpression>, |
nothing calls this directly
no test coverage detected