refactor(semantic): rename add_node_id to add_current_node_id_to_current_scope (#1847)

https://github.com/oxc-project/oxc/pull/1826#discussion_r1437074750
This commit is contained in:
Dunqing 2023-12-28 13:05:25 +08:00 committed by GitHub
parent 9c9d882d93
commit 497a0b8462
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -415,12 +415,12 @@ impl<'a> SemanticBuilder<'a> {
AstKind::Function(func) => { AstKind::Function(func) => {
self.function_stack.push(self.current_node_id); self.function_stack.push(self.current_node_id);
func.bind(self); func.bind(self);
self.add_node_id(); self.add_current_node_id_to_current_scope();
self.make_all_namespaces_valuelike(); self.make_all_namespaces_valuelike();
} }
AstKind::ArrowExpression(_) => { AstKind::ArrowExpression(_) => {
self.function_stack.push(self.current_node_id); self.function_stack.push(self.current_node_id);
self.add_node_id(); self.add_current_node_id_to_current_scope();
self.make_all_namespaces_valuelike(); self.make_all_namespaces_valuelike();
} }
AstKind::Class(class) => { AstKind::Class(class) => {
@ -539,7 +539,7 @@ impl<'a> SemanticBuilder<'a> {
} }
} }
fn add_node_id(&mut self) { fn add_current_node_id_to_current_scope(&mut self) {
self.scope.add_node_id(self.current_scope_id, self.current_node_id); self.scope.add_node_id(self.current_scope_id, self.current_node_id);
} }