aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer/ptr.rs')
-rw-r--r--src/lexer/ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lexer/ptr.rs b/src/lexer/ptr.rs
index 99d55b283..d1391fd5f 100644
--- a/src/lexer/ptr.rs
+++ b/src/lexer/ptr.rs
@@ -11,7 +11,7 @@ impl<'s> Ptr<'s> {
11 pub fn new(text: &'s str) -> Ptr<'s> { 11 pub fn new(text: &'s str) -> Ptr<'s> {
12 Ptr { 12 Ptr {
13 text, 13 text,
14 len: TextUnit::new(0), 14 len: 0.into(),
15 } 15 }
16 } 16 }
17 17
@@ -47,7 +47,7 @@ impl<'s> Ptr<'s> {
47 47
48 pub fn bump(&mut self) -> Option<char> { 48 pub fn bump(&mut self) -> Option<char> {
49 let ch = self.chars().next()?; 49 let ch = self.chars().next()?;
50 self.len += TextUnit::len_of_char(ch); 50 self.len += TextUnit::of_char(ch);
51 Some(ch) 51 Some(ch)
52 } 52 }
53 53