[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:
parent
b0b4699476
commit
a23b917785
6 changed files with 144 additions and 2 deletions
|
@ -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)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue