use alloc::string::String;
#[cfg(feature = "compiler")]
use alloc::vec::Vec;
#[cfg(feature = "compiler")]
use ellie_core::defs::Version;
#[cfg(feature = "compiler")]
use ellie_core::warning::Warning;
#[cfg(feature = "compiler")]
use ellie_parser::parser::Module;
#[cfg(feature = "compiler")]
use ellie_tokenizer::tokenizer::ResolvedImport;
#[cfg(feature = "compiler")]
pub struct CompileOutput {
pub warnings: Vec<Warning>,
pub module: Module,
}
pub struct MainProgram {
pub file_content: String,
pub file_name: String,
pub file_hash: usize,
pub start_directory: String,
}
#[cfg(feature = "compiler")]
#[derive(Clone)]
pub struct CompilerSettings {
pub name: String,
pub file_name: String,
pub is_lib: bool,
pub description: String,
pub experimental_features: bool,
pub version: Version,
pub byte_code_architecture: ellie_core::defs::PlatformArchitecture,
}
#[cfg(feature = "compiler")]
pub trait ProgramRepository {
fn read_main(&mut self) -> MainProgram;
fn read_module(
&mut self,
link_module: bool,
current_path: String,
requested_path: String,
) -> ResolvedImport;
}
pub struct ModuleMap {
pub module_name: String,
pub module_path: Option<String>,
}