diff options
Diffstat (limited to 'src/parse/tokens.rs')
| -rw-r--r-- | src/parse/tokens.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs index 68b31a87..312e941b 100644 --- a/src/parse/tokens.rs +++ b/src/parse/tokens.rs @@ -42,6 +42,11 @@ impl<'s> Tokens<'s> { self.s.index().into() } + /// Jump to the given position. + pub fn jump(&mut self, pos: Pos) { + self.s.jump(pos.to_usize()); + } + /// The underlying scanner. pub fn scanner(&self) -> &Scanner<'s> { &self.s |
