Wrap up a `LexError` with the given location.
(error: LexError, loc: Location)
| 89 | |
| 90 | /// Wrap up a `LexError` with the given location. |
| 91 | fn error<'a>(error: LexError, loc: Location) -> Result<LocatedToken<'a>, LocatedError> { |
| 92 | Err(LocatedError { |
| 93 | error, |
| 94 | location: loc, |
| 95 | }) |
| 96 | } |
| 97 | |
| 98 | /// Get the number of decimal digits at the end of `s`. |
| 99 | fn trailing_digits(s: &str) -> usize { |
no outgoing calls
no test coverage detected