/* * RepeatStatement.h * * Created on: Dec 9, 2012 * Author: attero */ #ifndef REPEATSTATEMENT_H_ #define REPEATSTATEMENT_H_ #include "ASTStatement.h" /** * Repeat statement if very useful, when you need to do something n-times * you just repeat(n) {block_of_code} * It stores how many times it should be executed * and what should be executed, that is body. */ class RepeatStatement: public ASTStatement { public: RepeatStatement(); int how_many_times; ASTStatement * body; void add_iteration_number(SenchaObject so); virtual SenchaObject execute(); void add_body(ASTStatement * statement); virtual ~RepeatStatement(); }; #endif /* REPEATSTATEMENT_H_ */