This commit is contained in:
Michael Zhang 2023-07-10 07:04:24 -05:00
parent cbce074ff1
commit 5ff5239482
1 changed files with 17 additions and 0 deletions

View File

@ -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<String>),
Item(String, Option<String>),
Module(String, Vec<ImportItem>),
}
// ===============================================
// Functions