summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/AST/RepeatStatement.h
blob: 1d651216087ab92f344433a90598393b4abbc228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * 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 void execute();
	virtual void execute_quietly();
	void add_body(ASTStatement * statement);
	virtual ~RepeatStatement();
};

#endif /* REPEATSTATEMENT_H_ */