Add ParameterList

This commit is contained in:
Markus Hauschild
2013-06-01 00:38:20 +02:00
parent a778d524b1
commit e2ab5af964
6 changed files with 63 additions and 8 deletions

24
src/AST/ParameterList.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include "AST/ParameterList.h"
#include "AST/ASTVisitor.h"
#include <iostream>
ParameterList::ParameterList() {
//
}
ParameterList::~ParameterList() {
//
}
void ParameterList::accept(ASTVisitor* visitor) {
visitor->visit(this);
}
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));
}
std::vector<Parameter> ParameterList::getParameters() {
return params_;
}

View File

@@ -3,3 +3,7 @@
Type::Type(std::string name) : name_(name) {
//
}
std::string Type::getName() {
return name_;
}