[parser] Handle None from input

This commit is contained in:
Eryn Wells 2018-08-24 08:26:08 -07:00
parent 96e92230ed
commit 976675027f
5 changed files with 29 additions and 3 deletions

View file

@ -19,9 +19,14 @@ impl NodeParser for SymParser {
NodeParseResult::Complete { obj: obj }
}
_ => {
let msg = format!("Expected symbol found {:?}", lex);
let msg = format!("Expected symbol, found {:?}", lex);
NodeParseResult::error(msg)
}
}
}
fn none(&mut self) -> NodeParseResult {
let msg = format!("Expected symbol, found EOF");
NodeParseResult::Error { msg }
}
}