Function prototypes

This commit is contained in:
2023-08-26 00:42:41 -05:00
parent 5bf5b7a78f
commit a7c7610105
4 changed files with 95 additions and 4 deletions
+7
View File
@@ -24,6 +24,7 @@ pub enum Declaration {
Function(Function),
Global(Global),
Const(Const),
Prototype(FunctionPrototype),
}
#[derive(PartialEq, Clone, Debug)]
@@ -49,6 +50,12 @@ pub struct Function {
pub body: Block,
}
#[derive(PartialEq, Clone, Debug)]
pub struct FunctionPrototype {
pub name: String,
pub args: Vec<String>,
}
#[derive(PartialEq, Clone, Debug)]
pub enum Statement {
Return(Return),