blob: 361f76fc1f44448556024db656100e6b7dbeda69 (
plain) (
tree)
|
|
mod lexer;
use lexer::Lexer;
use std::io::Read;
fn main() {
println!("Lex stdin.");
println!("ENTER to lex current input.");
println!("C-c to exit.");
let mut lex = Lexer::new(std::io::stdin().bytes().filter_map(|v| {
let v = v.ok()?;
Some(v.into())
}));
loop {
println!("{:?}", lex.gettok());
}
}
|