Skip to content

Commit

Permalink
docs: document the IR::dfs_with_scope method.
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Nov 22, 2024
1 parent ba09fbd commit 815bdac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/compiler/ir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ impl IR {
DFSIter::new(start, self)
}

/// Similar to [`IR::dfs_iter`] but returns an iterator that also can offer
/// information about the current scopes.
///
/// See [`DFSWithScopeIter`] for details.
pub fn dfs_with_scope(&self, start: ExprId) -> DFSWithScopeIter {
DFSWithScopeIter::new(start, self)
}
Expand Down

0 comments on commit 815bdac

Please sign in to comment.