Add support for module imports

This commit is contained in:
JT
2021-09-27 07:39:19 +13:00
parent 47421e9ca7
commit abb0d7bd22
11 changed files with 630 additions and 469 deletions

View File

@@ -0,0 +1,13 @@
use crate::Span;
#[derive(Debug, Clone)]
pub enum ImportPatternMember {
Glob { span: Span },
Name { name: Vec<u8>, span: Span },
}
#[derive(Debug, Clone)]
pub struct ImportPattern {
pub head: Vec<u8>,
pub members: Vec<ImportPatternMember>,
}

View File

@@ -3,6 +3,7 @@ mod call;
mod cell_path;
mod expr;
mod expression;
mod import_pattern;
mod operator;
mod pipeline;
mod statement;
@@ -12,6 +13,7 @@ pub use call::*;
pub use cell_path::*;
pub use expr::*;
pub use expression::*;
pub use import_pattern::*;
pub use operator::*;
pub use pipeline::*;
pub use statement::*;