error_string method

This commit is contained in:
Eryn Wells 2016-12-27 10:57:16 -07:00
parent f2ff1acdd1
commit 7d42ad280f

View file

@ -97,6 +97,10 @@ impl Lexer {
fn value(&self) -> String {
self.input[self.begin .. self.forward].to_string()
}
fn error_string(&self, message: &str) -> String {
format!("{}:{}: {}", self.line, self.line_offset, message)
}
}
impl Lexer {