StatementList
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "ConstantExpression.h"
|
||||
#include "VariableDefinition.h"
|
||||
#include "ParameterList.h"
|
||||
#include "StatementList.h"
|
||||
|
||||
class ASTVisitor {
|
||||
public:
|
||||
@@ -17,6 +18,7 @@ public:
|
||||
virtual void visit(ConstantExpression* e) = 0;
|
||||
virtual void visit(ParameterList* e) = 0;
|
||||
virtual void visit(VariableDefinition* e) = 0;
|
||||
virtual void visit(StatementList* e) = 0;
|
||||
};
|
||||
|
||||
#endif // ASTVISITOR_H
|
||||
|
||||
20
inc/AST/StatementList.h
Normal file
20
inc/AST/StatementList.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef STATEMENTLIST_H
|
||||
#define STATEMENTLIST_H
|
||||
|
||||
#include <vector>
|
||||
#include "AST/ASTElement.h"
|
||||
#include "AST/Statement.h"
|
||||
|
||||
class StatementList : public ASTElement
|
||||
{
|
||||
public:
|
||||
StatementList();
|
||||
virtual ~StatementList();
|
||||
virtual void accept(ASTVisitor* visitor);
|
||||
void addStatement(Statement* statement);
|
||||
std::vector<Statement*> getStatements();
|
||||
private:
|
||||
std::vector<Statement*> statements_;
|
||||
};
|
||||
|
||||
#endif // STATEMENTLIST_H
|
||||
Reference in New Issue
Block a user