(this: Parser, node: Undone<N.IfStatement>)
| 959 | |
| 960 | // https://tc39.es/ecma262/#prod-IfStatement |
| 961 | parseIfStatement(this: Parser, node: Undone<N.IfStatement>) { |
| 962 | this.next(); |
| 963 | node.test = this.parseHeaderExpression(); |
| 964 | // Annex B.3.3 |
| 965 | // https://tc39.es/ecma262/#sec-functiondeclarations-in-ifstatement-statement-clauses |
| 966 | node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(); |
| 967 | node.alternate = this.eat(tt._else) |
| 968 | ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() |
| 969 | : null; |
| 970 | return this.finishNode(node, "IfStatement"); |
| 971 | } |
| 972 | |
| 973 | parseReturnStatement(this: Parser, node: Undone<N.ReturnStatement>) { |
| 974 | if (!this.prodParam.hasReturn) { |
nothing calls this directly
no test coverage detected