diff --git a/src/ast.rs b/src/ast.rs index 7a98721..3fd0d71 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -24,10 +24,27 @@ pub struct Item { #[derive(Debug)] pub enum ItemKind { + Import(Import), FuncDef(FuncDef), StructDef(StructDef), } +// =============================================== +// Import + +#[derive(Debug)] +pub struct Import { + pub(crate) from: String, + pub(crate) items: ImportItem, +} + +#[derive(Debug)] +pub enum ImportItem { + SelfItem(Option), + Item(String, Option), + Module(String, Vec), +} + // =============================================== // Functions