Add token_result() helper

This commit is contained in:
Eryn Wells 2016-12-27 11:18:15 -07:00
parent 8d00e3afcf
commit 71fb678c50

View file

@ -101,6 +101,10 @@ impl Lexer {
fn error_string(&self, message: String) -> String { fn error_string(&self, message: String) -> String {
format!("{}:{}: {}", self.line, self.line_offset, message) format!("{}:{}: {}", self.line, self.line_offset, message)
} }
fn token_result(&self, token: Token) -> StateResult {
Ok(Some(token))
}
} }
impl Lexer { impl Lexer {