File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
crates/oxc_traverse/src/context Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,29 @@ impl<'a> TraverseCtx<'a> {
291291 self . scoping . generate_uid_in_root_scope ( name, flags)
292292 }
293293
294+ /// Generate UID based on node.
295+ ///
296+ /// This is a shortcut for `ctx.scoping.generate_uid_based_on_node`.
297+ pub fn generate_uid_based_on_node (
298+ & mut self ,
299+ node : & Expression < ' a > ,
300+ scope_id : ScopeId ,
301+ flags : SymbolFlags ,
302+ ) -> SymbolId {
303+ self . scoping . generate_uid_based_on_node ( node, scope_id, flags)
304+ }
305+
306+ /// Generate UID in current scope based on node.
307+ ///
308+ /// This is a shortcut for `ctx.scoping.generate_uid_in_current_scope_based_on_node`.
309+ pub fn generate_uid_in_current_scope_based_on_node (
310+ & mut self ,
311+ node : & Expression < ' a > ,
312+ flags : SymbolFlags ,
313+ ) -> SymbolId {
314+ self . scoping . generate_uid_in_current_scope_based_on_node ( node, flags)
315+ }
316+
294317 /// Create a reference bound to a `SymbolId`.
295318 ///
296319 /// This is a shortcut for `ctx.scoping.create_bound_reference`.
You can’t perform that action at this time.
0 commit comments