fixup! Add Function to AST

This commit is contained in:
numzero 2025-04-19 11:07:27 +03:00
parent 81a27e2a07
commit 4ab81edda1

View File

@ -35,12 +35,15 @@ pub enum Expression {
callee: Ident,
args: Vec<Expression>,
},
Function {
name: Option<Ident>,
args: Vec<Ident>,
body: Vec<Statement>,
ret: Option<Box<Expression>>,
},
Function(Function),
}
#[derive(Debug, Clone, Default)]
pub struct Function {
pub name: Option<Ident>,
pub args: Vec<Ident>,
pub body: Vec<Statement>,
pub ret: Option<Box<Expression>>,
}
#[derive(Debug, Clone, Default)]