Add ForStatement

This commit is contained in:
Markus Hauschild
2013-06-01 03:02:14 +02:00
parent a2ee427f57
commit 71abd2b56f
5 changed files with 65 additions and 5 deletions

25
inc/AST/ForStatement.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef FORSTATEMENT_H
#define FORSTATEMENT_H
#include "AST/Expression.h"
#include "AST/Statement.h"
class ForStatement : public Statement {
public:
ForStatement(Expression* init, Expression* cond, Expression* step, Statement* stmt);
virtual ~ForStatement();
virtual void accept(ASTVisitor* visitor);
Expression* getInit();
Expression* getCond();
Expression* getStep();
Statement* GetStmt();
private:
Expression* init_;
Expression* cond_;
Expression* step_;
Statement* stmt_;
};
#endif // FORSTATEMENT_H