1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use crate::lexer::Span; /// Error type for AST parsing operations #[derive(Debug, Clone, PartialEq)] pub struct ParseError { pub message: String, pub span: Span, } impl ParseError { pub fn new(message: impl Into<String>, span: Span) -> Self { Self { message: message.into(), span, } } }