Added function call and function definition

This commit is contained in:
Marvin Kaiser
2019-11-18 16:39:12 +01:00
parent 9385618252
commit 13caee0667
8 changed files with 242 additions and 76 deletions

View File

@@ -0,0 +1,22 @@
package de.hsrm.compiler.Klang.nodes;
import de.hsrm.compiler.Klang.visitors.Visitor;
public class FunctionDefinition extends Node {
public String name;
public String[] parameters;
public Block block;
public FunctionDefinition(String name, String[] parameters, Block block) {
this.name = name;
this.parameters = parameters;
this.block = block;
}
@Override
public <R> R welcome(Visitor<R> v) {
return v.visit(this);
}
}