/* * WhileNode.h * * Created on: Dec 10, 2012 * Author: attero */ #ifndef WHILENODE_H_ #define WHILENODE_H_ #include "ASTStatement.h" #include "ASTExpression.h" class WhileNode: public ASTStatement { public: WhileNode(ASTNode * parent); virtual ~WhileNode(); ASTStatement * body; void add_condition(ASTExpression * expression); void add_body(ASTStatement * statement); virtual std::string debug(); virtual void execute(); bool evaluate_condition(); }; #endif /* WHILENODE_H_ */