Blang/src/include/Statement/DoStatement.hpp

35 lines
663 B
C++
Raw Normal View History

2016-04-22 21:46:31 +02:00
#ifndef DOSTATEMENT_HPP
#define DOSTATEMENT_HPP
#include "Statement.hpp"
#include "ExprStatement.hpp"
#include "SourceLocation.hpp"
class DoStatement: public Statement{
public:
ExprStatement* getCond();
const ExprStatement* getCond() const;
void setCond(ExprStatement*);
Statement* getBody();
const Statement* getBody() const;
void setBody(Statement*);
SourceLocation getDoLocation() const;
void setDoLocation(SourceLocation);
SourceLocation getWhileLocation() const;
void setWhileLocation(SourceLocation);
private:
SourceLocation _DoLoc;
enum { BODY, COND, END_EXPR };
Statement* _subExprs[END_EXPR];
SourceLocation _WhileLoc;
};
#endif