atproto_mlf/error
Parse and lex error types plus describe, which renders a
“line:col: expected X, found Y” message. Lexer failures surface as
Lexical; everything the recursive-descent parser rejects surfaces as
Unexpected (a token mismatch) or Semantic (a well-formed construct
the target lexicon AST cannot represent, e.g. a non-primitive param).
Types
pub type ParseError {
Unexpected(span: token.Span, expected: String, found: String)
Semantic(span: token.Span, message: String)
Lexical(span: token.Span, message: String)
}
Constructors
-
Unexpected(span: token.Span, expected: String, found: String) -
Semantic(span: token.Span, message: String) -
Lexical(span: token.Span, message: String)
Values
pub fn describe(error: ParseError) -> String