(
this: Parser,
refExpressionErrors?: ExpressionErrors | null,
)
| 731 | |
| 732 | // https://tc39.es/ecma262/#prod-UpdateExpression |
| 733 | parseUpdate( |
| 734 | this: Parser, |
| 735 | refExpressionErrors?: ExpressionErrors | null, |
| 736 | ): N.Expression { |
| 737 | const startLoc = this.state.startLoc; |
| 738 | let expr = this.parseExprSubscripts(refExpressionErrors); |
| 739 | if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; |
| 740 | while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { |
| 741 | const node = this.startNodeAt<N.UpdateExpression>(startLoc); |
| 742 | node.operator = this.state.value; |
| 743 | node.prefix = false; |
| 744 | node.argument = expr as N.UpdateExpression["argument"]; |
| 745 | this.next(); |
| 746 | this.checkLVal(expr, (expr = this.finishNode(node, "UpdateExpression"))); |
| 747 | } |
| 748 | return expr; |
| 749 | } |
| 750 | |
| 751 | // Parse call, dot, and `[]`-subscript expressions. |
| 752 | // https://tc39.es/ecma262/#prod-LeftHandSideExpression |
nothing calls this directly
no test coverage detected