Archived
a42429012e
- crates/ → engrams/ (Rust engrams live here)
- el-compiler/ added: el self-hosting compiler as an el package
- src/{compiler,lexer,parser,codegen}.el
- bootstrap/el-compiler.elc (114KB, Rust-compiled seed)
- el.toml Cargo.toml workspace paths updated
- neuron-rs cross-repo path deps fixed (were pointing to products/ instead of foundation/)
30 lines
592 B
Rust
30 lines
592 B
Rust
//! Compiler error type.
|
|
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum CompileError {
|
|
#[error("lex error: {0}")]
|
|
Lex(#[from] el_lexer::LexError),
|
|
|
|
#[error("parse error: {0}")]
|
|
Parse(#[from] el_parser::ParseError),
|
|
|
|
#[error("type error: {0}")]
|
|
Type(String),
|
|
|
|
#[error("codegen error: {0}")]
|
|
Codegen(String),
|
|
|
|
#[error("seal error: {0}")]
|
|
Seal(#[from] el_seal::SealError),
|
|
|
|
#[error("serialization error: {0}")]
|
|
Serialization(String),
|
|
|
|
#[error("io error: {0}")]
|
|
Io(String),
|
|
}
|
|
|
|
pub type CompileResult<T> = Result<T, CompileError>;
|