diff options
Diffstat (limited to 'src/parse/parser.rs')
| -rw-r--r-- | src/parse/parser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 6598b1f2..503158a9 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -125,6 +125,7 @@ impl<'s> Parser<'s> { } /// Eat, debug-asserting that the token is the given one. + #[track_caller] pub fn eat_assert(&mut self, t: &NodeKind) { debug_assert_eq!(self.peek(), Some(t)); self.eat(); @@ -199,6 +200,7 @@ impl<'s> Parser<'s> { /// to `end_group`. /// /// This panics if the current token does not start the given group. + #[track_caller] pub fn start_group(&mut self, kind: Group) { self.groups.push(GroupEntry { kind, prev_mode: self.tokens.mode() }); self.tokens.set_mode(match kind { @@ -220,6 +222,7 @@ impl<'s> Parser<'s> { /// End the parsing of a group. /// /// This panics if no group was started. + #[track_caller] pub fn end_group(&mut self) { let group_mode = self.tokens.mode(); let group = self.groups.pop().expect("no started group"); |
