2013-06-01 00:16:38 +02:00
|
|
|
#ifndef VARIABLEDEFINITION_H
|
|
|
|
|
#define VARIABLEDEFINITION_H
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
#include "AST/Statement.h"
|
2013-06-01 00:43:30 +02:00
|
|
|
#include "AST/Type.h"
|
2013-06-01 00:16:38 +02:00
|
|
|
|
|
|
|
|
class VariableDefinition : public Statement
|
|
|
|
|
{
|
|
|
|
|
public:
|
2013-06-01 00:43:30 +02:00
|
|
|
VariableDefinition(Type *type, std::string name);
|
2013-06-01 00:16:38 +02:00
|
|
|
virtual ~VariableDefinition();
|
|
|
|
|
|
|
|
|
|
virtual void accept(ASTVisitor* visitor);
|
|
|
|
|
|
2013-06-01 00:43:30 +02:00
|
|
|
Type* getType();
|
2013-06-01 00:16:38 +02:00
|
|
|
std::string getName();
|
|
|
|
|
private:
|
2013-06-01 00:43:30 +02:00
|
|
|
Type* type_;
|
2013-06-01 00:16:38 +02:00
|
|
|
std::string name_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // VARIABLEDEFINITION_H
|