StatementList

This commit is contained in:
2013-06-01 02:16:34 +02:00
parent b45834151b
commit deab2d7dbc
5 changed files with 51 additions and 8 deletions

View File

@@ -1,6 +1,5 @@
#include "AST/ParameterList.h"
#include "AST/ASTVisitor.h"
#include <iostream>
ParameterList::ParameterList() {
//
@@ -15,7 +14,6 @@ void ParameterList::accept(ASTVisitor* visitor) {
}
void ParameterList::addParameter(Type* type, std::string name) {
std::cout << "added parameter of type " << type->getName() << " and name " << name << std::endl;
params_.push_back(Parameter(type, name));
}

22
src/AST/StatementList.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "AST/StatementList.h"
#include "AST/ASTVisitor.h"
StatementList::StatementList() {
//
}
StatementList::~StatementList() {
//
}
void StatementList::accept(ASTVisitor* visitor) {
visitor->visit(this);
}
void StatementList::addStatement(Statement* statement) {
statements_.push_back(statement);
}
std::vector<Statement*> StatementList::getStatements() {
return statements_;
}