Add ParameterList
This commit is contained in:
24
src/AST/ParameterList.cpp
Normal file
24
src/AST/ParameterList.cpp
Normal 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_;
|
||||
}
|
||||
@@ -3,3 +3,7 @@
|
||||
Type::Type(std::string name) : name_(name) {
|
||||
//
|
||||
}
|
||||
|
||||
std::string Type::getName() {
|
||||
return name_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user