FIX: Removes unused code

This commit is contained in:
Nicolás Hatcher
2024-02-14 09:40:00 +01:00
parent 52773494b3
commit e1bdabed2a
6 changed files with 2 additions and 117 deletions

View File

@@ -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(())
}

View File

@@ -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)
}
}