Blang/src/include/Statement/WhileStatement.hpp

30 lines
566 B
C++

#ifndef WHILESTATEMENT_HPP
#define WHILESTATEMENT_HPP
#include "Statement.hpp"
#include "Expr.hpp"
#include "SourceLocation.hpp"
class WhileStatement: public Statement{
public:
ExprStatement* getCond();
const ExprStatement* getCond() const;
void setCond(ExprStatement*);
Statement* getBody();
const Statement* getBody() const;
void setBody(Statement*);
SourceLocation getWhileLocation() const;
void setWhileLocation(SourceLocation);
private:
SourceLocation _WhileLoc;
enum { VAR, COND, BODY, END_EXPR };
Statement* _subExprs[END_EXPR];
};
#endif