fixup! Add Function to AST
This commit is contained in:
parent
81a27e2a07
commit
4ab81edda1
15
src/ast.rs
15
src/ast.rs
|
|
@ -35,12 +35,15 @@ pub enum Expression {
|
||||||
callee: Ident,
|
callee: Ident,
|
||||||
args: Vec<Expression>,
|
args: Vec<Expression>,
|
||||||
},
|
},
|
||||||
Function {
|
Function(Function),
|
||||||
name: Option<Ident>,
|
}
|
||||||
args: Vec<Ident>,
|
|
||||||
body: Vec<Statement>,
|
#[derive(Debug, Clone, Default)]
|
||||||
ret: Option<Box<Expression>>,
|
pub struct Function {
|
||||||
},
|
pub name: Option<Ident>,
|
||||||
|
pub args: Vec<Ident>,
|
||||||
|
pub body: Vec<Statement>,
|
||||||
|
pub ret: Option<Box<Expression>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user