[parser] Handle None from input
This commit is contained in:
parent
96e92230ed
commit
976675027f
5 changed files with 29 additions and 3 deletions
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue