[lexer] Add Error::invalid_char constructor

This commit is contained in:
Eryn Wells 2018-09-03 15:18:15 -07:00
parent 469929fb8f
commit b759ee4c57

View file

@ -14,5 +14,9 @@ impl Error {
}
}
pub fn invalid_char(c: char) -> Error {
Error::new(format!("invalid character: {}", c))
}
pub fn msg(&self) -> &str { &self.message }
}