MCPcopy Create free account
hub / github.com/PRQL/prql / from

Method from

prqlc/prqlc-parser/src/parser/perror.rs:86–93  ·  view source on GitHub ↗
(rich: Rich<'a, crate::lexer::lr::Token, Span>)

Source from the content-addressed store, hash-verified

84
85impl<'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
96impl<'a> From<Rich<'a, TokenKind, Span>> for Error {

Callers

nothing calls this directly

Calls 2

rich_error_to_errorFunction · 0.85
spanMethod · 0.45

Tested by

no test coverage detected