Add a Snapshot abstraction for deferring and restoring visitor context (#4353)

This commit is contained in:
Charlie Marsh
2023-05-10 12:50:47 -04:00
committed by GitHub
parent fd34797d0f
commit ea3d3a655d
4 changed files with 81 additions and 84 deletions

View File

@@ -30,6 +30,7 @@ impl From<NodeId> for usize {
}
}
/// A [`Node`] represents a statement in a program, along with a pointer to its parent (if any).
#[derive(Debug)]
struct Node<'a> {
/// The statement this node represents.