diff --git a/crates/lang/src/ast.rs b/crates/lang/src/ast.rs index d5838a2..42d160c 100644 --- a/crates/lang/src/ast.rs +++ b/crates/lang/src/ast.rs @@ -1,8 +1,6 @@ use crate::lst_parser::syntax_kind::SyntaxKind::*; use crate::SyntaxNode; use rowan::Language; - -// Heavily modified version of https://github.com/rust-analyzer/rowan/blob/e2d2e93e16c5104b136d0bc738a0d48346922200/examples/s_expressions.rs#L250-L266 macro_rules! ast_nodes { ($($ast:ident, $kind:ident);+) => { $( diff --git a/crates/lang/src/world.rs b/crates/lang/src/world.rs index 7713422..2ce9997 100644 --- a/crates/lang/src/world.rs +++ b/crates/lang/src/world.rs @@ -1,7 +1,5 @@ use std::path::Path; -use self::files::{Files, OpenFileError}; - mod error; mod files; @@ -9,19 +7,8 @@ struct World; impl World { pub fn new(entry_point: &Path) -> Result { - let mut files = Files::default(); - let (entry_point_id, errors) = files.add_file(entry_point)?; - todo!() } } -enum WorldCreationError { - FailedToOpenEntryPoint(OpenFileError), -} - -impl From for WorldCreationError { - fn from(value: OpenFileError) -> Self { - Self::FailedToOpenEntryPoint(value) - } -} +enum WorldCreationError {} diff --git a/crates/lang/src/world/files.rs b/crates/lang/src/world/files.rs index 24053d7..0c112ad 100644 --- a/crates/lang/src/world/files.rs +++ b/crates/lang/src/world/files.rs @@ -15,8 +15,7 @@ use crate::{ world::{error::Error, files::source_file::SourceFile}, }; -#[derive(Default)] -pub struct Files { +struct Files { inner: Vec, path_to_id_map: HashMap, }