finish engram-lang: protocols, decorators, imports, Result, closures, stdlib, integration tests
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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>.
|
||||
|
||||
Reference in New Issue
Block a user