Add new_frame method

This commit is contained in:
greg 2018-05-10 22:28:25 -07:00
parent 111657b567
commit e7615fda8b
1 changed files with 6 additions and 0 deletions

View File

@ -19,5 +19,11 @@ impl<'a, T, V> StateStack<'a, T, V> where T: Hash + Eq {
(Some(value), _) => Some(value),
}
}
pub fn new_frame(&'a self) -> StateStack<'a, T, V> where T: Hash + Eq {
StateStack {
parent: Some(self),
values: HashMap::default()
}
}
}