feat: start integrating miette
This commit is contained in:
@@ -18,9 +18,19 @@ pub enum ModuleKind {
|
||||
Script,
|
||||
}
|
||||
|
||||
impl ModuleKind {
|
||||
pub fn is_script(&self) -> bool {
|
||||
matches!(self, ModuleKind::Script)
|
||||
}
|
||||
|
||||
pub fn is_lib(&self) -> bool {
|
||||
matches!(self, ModuleKind::Lib)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Module<Info, Definitions> {
|
||||
pub name: Vec<String>,
|
||||
pub name: String,
|
||||
pub docs: Vec<String>,
|
||||
pub type_info: Info,
|
||||
pub definitions: Vec<Definitions>,
|
||||
|
||||
@@ -37,7 +37,7 @@ pub fn module_parser(
|
||||
kind,
|
||||
definitions,
|
||||
docs: vec![],
|
||||
name: vec![],
|
||||
name: "".to_string(),
|
||||
type_info: (),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ fn module() {
|
||||
ast::UntypedModule {
|
||||
docs: vec![],
|
||||
kind: ast::ModuleKind::Script,
|
||||
name: vec![],
|
||||
name: "".to_string(),
|
||||
type_info: (),
|
||||
definitions: vec![
|
||||
ast::UntypedDefinition::Use {
|
||||
|
||||
Reference in New Issue
Block a user