(this: Parser, node: Undone<N.NewExpression>)
| 1982 | // argument list. |
| 1983 | // https://tc39.es/ecma262/#prod-NewExpression |
| 1984 | parseNew(this: Parser, node: Undone<N.NewExpression>): N.NewExpression { |
| 1985 | this.parseNewCallee(node); |
| 1986 | |
| 1987 | if (this.eat(tt.parenL)) { |
| 1988 | const args = this.parseExprList(tt.parenR); |
| 1989 | this.toReferencedList(args); |
| 1990 | // (parseExprList should be all non-null in this case) |
| 1991 | node.arguments = args as N.Expression[]; |
| 1992 | } else { |
| 1993 | node.arguments = []; |
| 1994 | } |
| 1995 | |
| 1996 | return this.finishNode(node, "NewExpression"); |
| 1997 | } |
| 1998 | |
| 1999 | parseNewCallee(this: Parser, node: Undone<N.NewExpression>): void { |
| 2000 | const callee = this.parseNoCallExpr(base => { |
nothing calls this directly
no test coverage detected