Skip to content

Commit 6a4940c

Browse files
committed
fix: program node CFG.
1 parent edbe4dc commit 6a4940c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/oxc_semantic/src/builder.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -448,13 +448,14 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
448448
flags
449449
});
450450
program.scope_id.set(Some(self.current_scope_id));
451-
self.enter_node(kind);
452451

453452
/* cfg */
454453
let error_harness = self.cfg.attach_error_harness(ErrorEdgeKind::Implicit);
455454
let _program_basic_block = self.cfg.new_basic_block_normal();
456455
/* cfg - must be above directives as directives are in cfg */
457456

457+
self.enter_node(kind);
458+
458459
for directive in &program.directives {
459460
self.visit_directive(directive);
460461
}

0 commit comments

Comments
 (0)