Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Aug 15, 2024
1 parent 9c00f30 commit ec89b5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crates/oxc_traverse/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,11 @@ impl<'a> TraverseCtx<'a> {
self.scoping.create_reference_in_current_scope(name, flag)
}

/// Clone IdentifierReference based on the original reference's SymbolId and name.
/// Clone `IdentifierReference` based on the original reference's `SymbolId` and name.
///
/// This method makes a lookup of the `SymbolId` for the reference. If you need to create multiple
/// `IdentifierReference`s for the same binding, it is better to look up the `SymbolId` only once,
/// and generate `IdentifierReference`s with `TraverseCtx::create_reference_id`.
///
/// This is a shortcut for `ctx.scoping.clone_identifier_reference`.
pub fn clone_identifier_reference(
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_traverse/src/context/scoping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ impl TraverseScoping {
///
/// This method makes a lookup of the `SymbolId` for the reference. If you need to create multiple
/// `IdentifierReference`s for the same binding, it is better to look up the `SymbolId` only once,
/// and generate `IdentifierReference`s with `TraverseCtx::create_reference_id`.
/// and generate `IdentifierReference`s with `TraverseScoping::create_reference_id`.
pub fn clone_identifier_reference<'a>(
&mut self,
ident: &IdentifierReference<'a>,
Expand Down

0 comments on commit ec89b5d

Please sign in to comment.