diff --git a/parser/src/lib.rs b/parser/src/lib.rs index 0c26db7..8cf0fb8 100644 --- a/parser/src/lib.rs +++ b/parser/src/lib.rs @@ -76,7 +76,7 @@ impl Iterator for Parser where T: Iterator { input_lex }, Some(NodeParseResult::Error{ msg }) => { - out = Some(Err(ParseError::ParserError{ msg: msg })); + out = Some(Err(ParseError::ParserError{ msg })); break; } }; @@ -87,15 +87,15 @@ impl Iterator for Parser where T: Iterator { result = Some(self.parse_lex(lex)); }, Some(Err(ref error)) => { - // TODO: Lexer error. Throw it up and out. + // Lexer error. Throw it up and out. let msg = error.msg().to_string(); - out = Some(Err(ParseError::LexerError { msg: msg })); + out = Some(Err(ParseError::LexerError { msg })); break; }, None => { - // TODO: We didn't get a Lex from the input, which means the - // input is done. If there's any parse result waiting - // around, clean it up and return it or return an error. + // We didn't get a Lex from the input, which means the input + // is done. If there's any parse result waiting around, + // clean it up and return it or return an error. result = Some(self.parse_none()); } } diff --git a/parser/src/list_parser.rs b/parser/src/list_parser.rs index 6c1322a..4996069 100644 --- a/parser/src/list_parser.rs +++ b/parser/src/list_parser.rs @@ -49,6 +49,6 @@ impl NodeParser for ListParser { fn none(&mut self) -> NodeParseResult { let msg = format!("Unmatched paren, found EOF"); - NodeParseResult::Error { msg } + NodeParseResult::error(msg) } } diff --git a/parser/src/node_parser.rs b/parser/src/node_parser.rs index 3801422..fede135 100644 --- a/parser/src/node_parser.rs +++ b/parser/src/node_parser.rs @@ -3,7 +3,7 @@ */ use std::fmt::Debug; -use sibillexer::{Lex, Token}; +use sibillexer::Lex; use sibiltypes::Obj; #[derive(Debug)] diff --git a/parser/src/sym_parser.rs b/parser/src/sym_parser.rs index b0257a4..7933884 100644 --- a/parser/src/sym_parser.rs +++ b/parser/src/sym_parser.rs @@ -27,6 +27,6 @@ impl NodeParser for SymParser { fn none(&mut self) -> NodeParseResult { let msg = format!("Expected symbol, found EOF"); - NodeParseResult::Error { msg } + NodeParseResult::error(msg) } }