From 89d747a28b6d69352af579013f700ac7444b9271 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Fri, 25 Jul 2025 11:13:46 +0000 Subject: [PATCH] refactor(semantic): correct comment (#12512) #12087 changed parentage of AST nodes so `Program` is now its own parent. Update an outdated comment to reflect this change. --- crates/oxc_semantic/src/builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_semantic/src/builder.rs b/crates/oxc_semantic/src/builder.rs index be5bde8827f21..706c9089347d0 100644 --- a/crates/oxc_semantic/src/builder.rs +++ b/crates/oxc_semantic/src/builder.rs @@ -611,7 +611,7 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> { }); /* cfg - must be above directives as directives are in cfg */ - // Don't call `enter_node` here as `Program` is a special case - node has no `parent_id`. + // Don't call `enter_node` here as `Program` is a special case - node has itself as `parent_id`. // Inline the specific logic for `Program` here instead. // This avoids `Nodes::add_node` having to handle the special case. // We can also skip calling `self.enter_kind`, `self.record_ast_node`