Skip to content

Commit adaa69a

Browse files
committed
WIP
1 parent 1cd484a commit adaa69a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/** @import { NewExpression, Expression } from 'estree' */
2+
/** @import { Context } from '../types' */
3+
import { dev } from '../../../../state.js';
4+
import { trace } from '../utils.js';
5+
6+
/**
7+
* @param {NewExpression} node
8+
* @param {Context} context
9+
*/
10+
export function NewExpression(node, context) {
11+
if (dev) {
12+
return trace(
13+
node,
14+
{
15+
...node,
16+
callee: /** @type {Expression} */ (context.visit(node.callee)),
17+
arguments: node.arguments.map((arg) => /** @type {Expression} */ (context.visit(arg)))
18+
},
19+
context.state
20+
);
21+
}
22+
23+
context.next();
24+
}

0 commit comments

Comments
 (0)