[lexer] Lex bools!

Extend the lexer to support Scheme bools like this: #t, #f, #true, #false.
Add some positive tests for this too.
This commit is contained in:
Eryn Wells 2018-08-26 13:40:27 -07:00
parent b0b4699476
commit a23b917785
6 changed files with 144 additions and 2 deletions

View file

@ -54,7 +54,6 @@ impl<T> Iterator for Lexer<T> where T: Iterator<Item=char> {
let peek = self.input.peek().map(char::clone);
println!("lexing {:?} in state {:?}, buffer = {:?}", peek, state, buffer);
match peek {
// TODO: Give the current state a chance to react.
None => match state.none() {
Ok(None) => break,
Ok(Some(token)) => {