a
This commit is contained in:
parent
cbce074ff1
commit
5ff5239482
1 changed files with 17 additions and 0 deletions
17
src/ast.rs
17
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<String>),
|
||||
Item(String, Option<String>),
|
||||
Module(String, Vec<ImportItem>),
|
||||
}
|
||||
|
||||
// ===============================================
|
||||
// Functions
|
||||
|
||||
|
|
Loading…
Reference in a new issue