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, 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)]