35 lines
663 B
C++
35 lines
663 B
C++
|
#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
|