aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/ptr.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2017-12-31 07:41:42 +0000
committerAleksey Kladov <[email protected]>2017-12-31 07:41:42 +0000
commitd6a922459ed3ebc77ba5d79cd65144078f43e321 (patch)
tree2e8082efef7cd018e06c38740828fa6a3e1c0a8e /src/lexer/ptr.rs
parent492f6e6b1c8d062c6732f9aa3360c14708bb1452 (diff)
Lexer: basic chars & lifetimes
Diffstat (limited to 'src/lexer/ptr.rs')
-rw-r--r--src/lexer/ptr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lexer/ptr.rs b/src/lexer/ptr.rs
index b380117e6..2f759119a 100644
--- a/src/lexer/ptr.rs
+++ b/src/lexer/ptr.rs
@@ -34,6 +34,10 @@ impl<'s> Ptr<'s> {
34 self.nnext() == Some(c) 34 self.nnext() == Some(c)
35 } 35 }
36 36
37 pub fn next_is_p<P: Fn(char) -> bool>(&self, p: P) -> bool {
38 self.next().map(p) == Some(true)
39 }
40
37 pub fn nnext_is_p<P: Fn(char) -> bool>(&self, p: P) -> bool { 41 pub fn nnext_is_p<P: Fn(char) -> bool>(&self, p: P) -> bool {
38 self.nnext().map(p) == Some(true) 42 self.nnext().map(p) == Some(true)
39 } 43 }