sencha-lang/Sencha-lang/AST/WhileNode.h

29 lines
575 B
C
Raw Normal View History

/*
* WhileNode.h
*
* Created on: Dec 10, 2012
* Author: attero
*/
#ifndef WHILENODE_H_
#define WHILENODE_H_
#include "ASTStatement.h"
2012-12-10 11:37:29 +00:00
#include "ASTExpression.h"
/**
* WhileNode is a while construct. It evaluates condition and executes
* body if it's true, when condition turn into false, WhileNode breaks loop.
*/
class WhileNode: public ASTStatement {
public:
2012-12-28 16:39:43 +00:00
WhileNode(ASTExpression * condition, ASTStatement * body);
virtual ~WhileNode();
2012-12-10 11:37:29 +00:00
ASTStatement * body;
virtual SenchaObject execute();
2012-12-10 11:37:29 +00:00
bool evaluate_condition();
};
#endif /* WHILENODE_H_ */