lehit 0.2.0

Embeddable Lehit language frontend and Cranelift JIT runtime
Documentation
use crate::parsing::Span;

#[derive(Debug, Clone)]
pub struct ParsingError {
    pub span: Span,
    pub kind: ParsingErrorKind,
}

#[derive(Debug, Clone, Copy)]
pub enum ParsingErrorKind {
    UnexpectedToken,

    IdentExpected,

    NoLifetimeIdent,

    GenericListNotClosed,
    GenericListHasNoItems,
}

impl ParsingError {
    pub fn new(span: Span, kind: ParsingErrorKind) -> Self {
        Self { span, kind }
    }
}