[ast]
Add import statement to AST
@@ -13,6 +13,7 @@ impl From<String> for Ident {
pub enum Statement {
If(Box<IfStatement>),
While(Box<WhileStatement>),
+ Import(Box<ImportStatement>),
Let(Box<LetStatement>),
Const(Box<ConstStatement>),
Constrain(Box<ConstrainStatement>),
@@ -36,6 +37,12 @@ pub struct WhileStatement {
block: Statement,
}
+#[derive(Debug, PartialEq, Eq, Clone)]
+pub struct ImportStatement {
+ pub path: Vec<String>,
+ pub alias: Option<String>,
+}
+
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct BlockStatement(pub Vec<Statement>);
