FunctionDefinition plus use more stuff in the grammar

This commit is contained in:
Markus Hauschild
2013-06-01 02:50:47 +02:00
parent 5c011f3ac4
commit e2dcf5f507
5 changed files with 78 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
#include "AST/FunctionDefinition.h"
#include "AST/ASTVisitor.h"
FunctionDefinition::FunctionDefinition(Type *type, std::string name, ParameterList *params, StatementList *sl) : type_(type), name_(name), params_(params), sl_(sl) {
//
}
FunctionDefinition::~FunctionDefinition() {
//
}
void FunctionDefinition::accept(ASTVisitor* visitor) {
visitor->visit(this);
}
Type* FunctionDefinition::getType() {
return type_;
}
std::string FunctionDefinition::getName() {
return name_;
}
ParameterList* FunctionDefinition::getParams() {
return params_;
}
StatementList* FunctionDefinition::getSl() {
return sl_;
}