Add ForStatement
This commit is contained in:
25
inc/AST/ForStatement.h
Normal file
25
inc/AST/ForStatement.h
Normal 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
|
||||
Reference in New Issue
Block a user