(
this: Parser,
node: Undone<N.DoWhileStatement>,
)
| 801 | |
| 802 | // https://tc39.es/ecma262/#prod-DoWhileStatement |
| 803 | parseDoWhileStatement( |
| 804 | this: Parser, |
| 805 | node: Undone<N.DoWhileStatement>, |
| 806 | ): N.DoWhileStatement { |
| 807 | this.next(); |
| 808 | this.state.labels.push(loopLabel); |
| 809 | |
| 810 | // Parse the loop body's body. |
| 811 | node.body = this.parseStatement(); |
| 812 | |
| 813 | this.state.labels.pop(); |
| 814 | |
| 815 | this.expect(tt._while); |
| 816 | node.test = this.parseHeaderExpression(); |
| 817 | this.eat(tt.semi); |
| 818 | return this.finishNode(node, "DoWhileStatement"); |
| 819 | } |
| 820 | |
| 821 | // Disambiguating between a `for` and a `for`/`in` or `for`/`of` |
| 822 | // loop is non-trivial. Basically, we have to parse the init `var` |
nothing calls this directly
no test coverage detected