Created
June 13, 2016 15:37
-
-
Save anonymous/bdb8e4b640efe1704bf118a058e02df9 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let expect_next_token = |it: &mut Iter<u8>, tok: u8| -> bool { | |
match it.peekable().peek() { | |
Some(x) => { | |
if **x == tok { | |
return true; | |
} | |
} | |
None => { | |
return false; | |
} | |
} | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment