lang: module resolvin

This commit is contained in:
Schrottkatze 2024-06-05 21:10:52 +02:00
commit 7bc603f7e7
No known key found for this signature in database
5 changed files with 148 additions and 156 deletions

View file

@ -1,10 +1,10 @@
use std::{collections::HashMap, path::PathBuf, sync::Arc};
use std::{collections::HashMap, path::PathBuf};
use rowan::ast::{AstNode, AstPtr};
use self::{
error::{Error, WorldCreationError},
mod_tree::{Module, ModuleTree},
mod_tree::ModuleTree,
source_file::SourceFile,
};
@ -42,7 +42,7 @@ impl World {
Err(e) => return Err(WorldCreationError::FailedToOpenEntryPoint(entry_point, e)),
};
let (src, mut errors) = SourceFile::parse_from(entry_point.clone(), source);
let (src, mut errors) = SourceFile::parse_from(&entry_point, source);
let (module_tree, mut files, new_errors) = ModuleTree::parse_from_main(&entry_point, &src);
errors.extend(new_errors);