Function prototypes
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user