error_string method
This commit is contained in:
parent
f2ff1acdd1
commit
7d42ad280f
1 changed files with 4 additions and 0 deletions
|
@ -97,6 +97,10 @@ impl Lexer {
|
||||||
fn value(&self) -> String {
|
fn value(&self) -> String {
|
||||||
self.input[self.begin .. self.forward].to_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 {
|
impl Lexer {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue