FunctionDefinition plus use more stuff in the grammar
This commit is contained in:
30
src/AST/FunctionDefinition.cpp
Normal file
30
src/AST/FunctionDefinition.cpp
Normal 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_;
|
||||
}
|
||||
Reference in New Issue
Block a user