(rich: Rich<'a, crate::lexer::lr::Token, Span>)
| 84 | |
| 85 | impl<'a> From<Rich<'a, crate::lexer::lr::Token, Span>> for Error { |
| 86 | fn from(rich: Rich<'a, crate::lexer::lr::Token, Span>) -> Error { |
| 87 | rich_error_to_error( |
| 88 | *rich.span(), |
| 89 | rich.reason(), |
| 90 | |token| format!("{}", token.kind), |
| 91 | |token| matches!(token.kind, TokenKind::NewLine | TokenKind::Start), |
| 92 | ) |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | impl<'a> From<Rich<'a, TokenKind, Span>> for Error { |
nothing calls this directly
no test coverage detected