Iterate lexer

This commit is contained in:
Eryn Wells 2016-12-20 17:52:46 -08:00
parent 7de54a9835
commit fbf1d07e27
2 changed files with 5 additions and 0 deletions

View file

@ -28,6 +28,8 @@ impl Iterator for Lexer {
type Item = Token;
fn next(&mut self) -> Option<Token> {
let mut forward = self.index;
println!("Lexing '{}'", self.input);
None
}
}

View file

@ -6,4 +6,7 @@ fn main() {
lexer::hello("Emily");
let s = "Jonas".to_string();
lexer::hello(&s);
let lexer = lexer::Lexer::new(String::from("((abc))"));
for t in lexer { }
}