Error if not all the input is consumed when parsing expressions

This commit is contained in:
Oliver Hamlet
2019-01-26 09:44:33 +00:00
parent 3777c067a4
commit 529e4fc6d1
3 changed files with 25 additions and 1 deletions
+1
View File
@@ -23,6 +23,7 @@ pub fn handle_error(err: Error) -> c_int {
fn map_error(err: &Error) -> c_int {
match err {
Error::ParsingIncomplete => LCI_ERROR_PARSING_ERROR,
Error::UnconsumedInput(_) => LCI_ERROR_PARSING_ERROR,
Error::GenericParsingError(_, _) => LCI_ERROR_PARSING_ERROR,
Error::CustomParsingError(_, _) => LCI_ERROR_PARSING_ERROR,
Error::PeParsingError(_, _) => LCI_ERROR_PE_PARSING_ERROR,