(
this: Parser,
node: Undone<N.ArrowFunctionExpression>,
)
| 1549 | |
| 1550 | // async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In] |
| 1551 | parseAsyncArrowUnaryFunction( |
| 1552 | this: Parser, |
| 1553 | node: Undone<N.ArrowFunctionExpression>, |
| 1554 | ): N.ArrowFunctionExpression { |
| 1555 | // We don't need to push a new ParameterDeclarationScope here since we are sure |
| 1556 | // 1) it is an async arrow, 2) no biding pattern is allowed in params |
| 1557 | this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); |
| 1558 | const params = [this.parseIdentifier()]; |
| 1559 | this.prodParam.exit(); |
| 1560 | if (this.hasPrecedingLineBreak()) { |
| 1561 | this.raise(Errors.LineTerminatorBeforeArrow, this.state.curPosition()); |
| 1562 | } |
| 1563 | this.expect(tt.arrow); |
| 1564 | // let foo = async bar => {}; |
| 1565 | return this.parseArrowExpression(node, params, true); |
| 1566 | } |
| 1567 | |
| 1568 | // https://github.com/tc39/proposal-do-expressions |
| 1569 | // https://github.com/tc39/proposal-async-do-expressions |
nothing calls this directly
no test coverage detected