diff options
Diffstat (limited to 'src/lexer/ptr.rs')
-rw-r--r-- | src/lexer/ptr.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lexer/ptr.rs b/src/lexer/ptr.rs index 2f759119a..ff6ef11fc 100644 --- a/src/lexer/ptr.rs +++ b/src/lexer/ptr.rs | |||
@@ -59,6 +59,11 @@ impl<'s> Ptr<'s> { | |||
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | pub fn current_token_text(&self) -> &str { | ||
63 | let len: u32 = self.len.into(); | ||
64 | &self.text[..len as usize] | ||
65 | } | ||
66 | |||
62 | fn chars(&self) -> Chars { | 67 | fn chars(&self) -> Chars { |
63 | let len: u32 = self.len.into(); | 68 | let len: u32 = self.len.into(); |
64 | self.text[len as usize ..].chars() | 69 | self.text[len as usize ..].chars() |