finish engram-lang: protocols, decorators, imports, Result, closures, stdlib, integration tests

This commit is contained in:
Will Anderson
2026-04-27 20:22:23 -05:00
parent 316c0a85ce
commit c427a0adc0
32 changed files with 2878 additions and 32 deletions
+2 -2
View File
@@ -298,9 +298,9 @@ impl BuildSystem {
let source = std::fs::read_to_string(&entry)?;
let tokens = el_lexer::tokenize(&source)
.map_err(|e| el_compiler::CompileError::Lex(e))?;
.map_err(el_compiler::CompileError::Lex)?;
let program = el_parser::parse(tokens, source.clone())
.map_err(|e| el_compiler::CompileError::Parse(e))?;
.map_err(el_compiler::CompileError::Parse)?;
let mut checker = el_types::TypeChecker::with_builtins();
let diags = checker.check(&program);
Ok(diags.iter().map(|d| d.message.clone()).collect())
+1 -1
View File
@@ -117,7 +117,7 @@ impl PluginRegistry {
manifest: &Manifest,
plugin_dir: &Path,
) -> Result<(), PluginError> {
for (name, _version) in &manifest.plugins {
for name in manifest.plugins.keys() {
// TODO(LLVM backend): use `libloading` crate to dlopen the .dylib/.so,
// look up the `engram_plugin_init` symbol, call it, and register the
// returned Box<dyn CompilerPlugin>.