2013-06-02 09:47:27 +02:00
|
|
|
/* The scully programming language.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) Peter Dahlberg, Markus Hauschild and Florian Sattler, 2013.
|
|
|
|
|
* Licensed under the GNU GPL v2.
|
|
|
|
|
*/
|
|
|
|
|
|
2013-06-01 00:16:38 +02:00
|
|
|
#include "AST/VariableDefinition.h"
|
|
|
|
|
#include "AST/ASTVisitor.h"
|
|
|
|
|
|
2013-06-01 16:22:01 +02:00
|
|
|
VariableDefinition::VariableDefinition(Type type, std::string name) : type_(type), name_(name) {
|
2013-06-01 00:16:38 +02:00
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VariableDefinition::~VariableDefinition() {
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void VariableDefinition::accept(ASTVisitor* visitor) {
|
|
|
|
|
visitor->visit(this);
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-01 16:22:01 +02:00
|
|
|
Type VariableDefinition::getType() {
|
2013-06-01 00:16:38 +02:00
|
|
|
return type_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string VariableDefinition::getName() {
|
|
|
|
|
return name_;
|
|
|
|
|
}
|