(
this: Parser,
base: N.Expression,
startLoc: Position,
state: N.ParseSubscriptState,
)
| 940 | |
| 941 | // https://github.com/tc39/proposal-bind-operator#syntax |
| 942 | parseBind( |
| 943 | this: Parser, |
| 944 | base: N.Expression, |
| 945 | startLoc: Position, |
| 946 | state: N.ParseSubscriptState, |
| 947 | ): N.Expression { |
| 948 | const node = this.startNodeAt<N.BindExpression>(startLoc); |
| 949 | node.object = base; |
| 950 | this.next(); // eat '::' |
| 951 | const callee = this.parseNoCallExpr(base => { |
| 952 | throw this.raise(Errors.UnsupportedBindRHS, base); |
| 953 | }); |
| 954 | if (callee.type === "Super" || callee.type === "Import") { |
| 955 | throw this.raise(Errors.UnsupportedBindRHS, callee); |
| 956 | } |
| 957 | node.callee = callee; |
| 958 | |
| 959 | state.stop = true; |
| 960 | return this.parseSubscripts( |
| 961 | this.finishNode(node, "BindExpression"), |
| 962 | startLoc, |
| 963 | false, |
| 964 | ); |
| 965 | } |
| 966 | |
| 967 | // https://tc39.es/ecma262/#prod-CoverCallExpressionAndAsyncArrowHead |
| 968 | // CoverCallExpressionAndAsyncArrowHead |
nothing calls this directly
no test coverage detected