diff --git a/src/lexer/mod.rs b/src/lexer/mod.rs index 0a25113..fbf5324 100644 --- a/src/lexer/mod.rs +++ b/src/lexer/mod.rs @@ -106,8 +106,8 @@ impl Lexer { Ok(Some(token)) } - fn generic_error(c: char) -> StateResult { - Err(self.error_string(format!("Invalid token character: {}", c))); + fn generic_error(&self, c: char) -> StateResult { + Err(self.error_string(format!("Invalid token character: {}", c))) } }