rename crates/ to engrams/; add el-compiler el package with bootstrap artifact

- 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/)
This commit is contained in:
Will Anderson
2026-04-29 03:27:32 -05:00
parent 19ed2721ee
commit a42429012e
120 changed files with 3836 additions and 64 deletions
+45
View File
@@ -0,0 +1,45 @@
//! Diagnostic types for the architectural checker.
/// Severity level of an architectural diagnostic.
#[derive(Debug, Clone, PartialEq)]
pub enum Severity {
Error,
Warning,
}
/// A single architectural diagnostic (error or warning).
#[derive(Debug, Clone)]
pub struct ArchDiagnostic {
pub severity: Severity,
/// Rule identifier, e.g. "VBD-001".
pub rule: String,
pub message: String,
/// Function name or other location hint.
pub location: Option<String>,
}
/// Type alias — an ArchError is an ArchDiagnostic with Severity::Error.
pub type ArchError = ArchDiagnostic;
/// Type alias — an ArchWarning is an ArchDiagnostic with Severity::Warning.
pub type ArchWarning = ArchDiagnostic;
impl ArchDiagnostic {
pub fn error(rule: impl Into<String>, message: impl Into<String>, location: Option<String>) -> Self {
Self {
severity: Severity::Error,
rule: rule.into(),
message: message.into(),
location,
}
}
pub fn warning(rule: impl Into<String>, message: impl Into<String>, location: Option<String>) -> Self {
Self {
severity: Severity::Warning,
rule: rule.into(),
message: message.into(),
location,
}
}
}