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