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

29 lines
575 B
C++

/*
* WhileNode.h
*
* Created on: Dec 10, 2012
* Author: attero
*/
#ifndef WHILENODE_H_
#define WHILENODE_H_
#include "ASTStatement.h"
#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:
WhileNode(ASTExpression * condition, ASTStatement * body);
virtual ~WhileNode();
ASTStatement * body;
virtual SenchaObject execute();
bool evaluate_condition();
};
#endif /* WHILENODE_H_ */