FIX: Removes unused code
This commit is contained in:
@@ -140,7 +140,7 @@ impl Lexer {
|
||||
pub fn expect(&mut self, tk: TokenType) -> Result<()> {
|
||||
let nt = self.next_token();
|
||||
if index(&nt) != index(&tk) {
|
||||
return Err(self.set_error(&format!("Error, expected {}", tk), self.position));
|
||||
return Err(self.set_error(&format!("Error, expected {:?}", tk), self.position));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -80,8 +80,3 @@ pub fn get_tokens(formula: &str) -> Vec<MarkedToken> {
|
||||
tokens
|
||||
}
|
||||
|
||||
impl fmt::Display for MarkedToken {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "{}", self.token)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user