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