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

30
src/AST/ForStatement.cpp Normal file
View File

@@ -0,0 +1,30 @@
#include "AST/ForStatement.h"
#include "AST/ASTVisitor.h"
ForStatement::ForStatement(Expression *init, Expression *cond, Expression *step, Statement *stmt) : init_(init), cond_(cond), step_(step), stmt_(stmt) {
//
}
ForStatement::~ForStatement() {
//
}
void ForStatement::accept(ASTVisitor* visitor) {
visitor->visit(this);
}
Expression* ForStatement::getInit() {
return init_;
}
Expression* ForStatement::getCond() {
return cond_;
}
Expression* ForStatement::getStep() {
return step_;
}
Statement* ForStatement::GetStmt() {
return stmt_;
}