(&mut self)
| 47 | pub struct LexError { |
| 48 | pub kind: LexErrorKind, |
| 49 | pub span: Span, |
| 50 | } |
| 51 | |
| 52 | impl fmt::Display for LexError { |
| 53 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 54 | let message = match self.kind { |
| 55 | LexErrorKind::MalformedNumber => "malformed number".to_string(), |
| 56 | LexErrorKind::UnknownCharacter(c) => format!("unknown character `{c}`"), |