diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-12-15 20:27:41 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-12-15 20:27:41 +0100 |
| commit | 2a3d0f4b390457174ed09347dd29e97ff9a783e4 (patch) | |
| tree | 0e0634bff6b7f64131267f4cbe05651c1c91d900 /src/parse/parser.rs | |
| parent | 244ad386ec271ff86a2101eb4cc38d37a55552b9 (diff) | |
Set Rules Episode VII: The Set Awakens
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"); |
