Only use a local context when checking exit matchers.

This prevents context tree from deeper in the parse impacting exit checks for earlier in the parse. This is needed due to the trailing whitespace context element.
This commit is contained in:
Tom Alexander
2023-04-10 10:49:28 -04:00
parent 9a0172e1a4
commit 137815dbaf
2 changed files with 16 additions and 2 deletions

View File

@@ -31,6 +31,12 @@ impl<T> List<T> {
List { head: None }
}
pub fn branch_from(trunk: &Rc<Node<T>>) -> Self {
List {
head: Some(trunk.clone()),
}
}
pub fn push_front(&self, data: T) -> List<T> {
List {
head: Some(Rc::new(Node {