diff --git a/crates/formality-core/src/parse/parser.rs b/crates/formality-core/src/parse/parser.rs index 2d9c88d7..8a4428e0 100644 --- a/crates/formality-core/src/parse/parser.rs +++ b/crates/formality-core/src/parse/parser.rs @@ -300,6 +300,7 @@ where CurrentState { left_right, precedence: self.precedence, + current_text: self.current_text, } } diff --git a/crates/formality-core/src/parse/parser/left_recursion.rs b/crates/formality-core/src/parse/parser/left_recursion.rs index 2ee8deb5..f62f9247 100644 --- a/crates/formality-core/src/parse/parser/left_recursion.rs +++ b/crates/formality-core/src/parse/parser/left_recursion.rs @@ -45,6 +45,7 @@ struct StackEntry { pub(super) struct CurrentState { pub left_right: LeftRight, pub precedence: Precedence, + pub current_text: *const str, } /// Determines the kind of recursion the current variant