33 lines
689 B
C++
33 lines
689 B
C++
#include "Statement/WhileStatement.hpp"
|
|
|
|
ExprStatement* WhileStatement::getCond(){
|
|
return reinterpret_cast<ExprStatement*>(_subExprs[COND]);
|
|
}
|
|
|
|
const ExprStatement* WhileStatement::getCond() const{
|
|
return getCond();
|
|
}
|
|
|
|
void WhileStatement::setCond(ExprStatement* e){
|
|
_subExprs[COND] = reinterpret_cast<Statement *>(e);
|
|
}
|
|
|
|
Statement* WhileStatement::getBody(){
|
|
return _subExprs[BODY];
|
|
}
|
|
|
|
const Statement* WhileStatement::getBody() const{
|
|
return getBody();
|
|
}
|
|
|
|
void WhileStatement::setBody(Statement* s){
|
|
_subExprs[BODY] = s;
|
|
}
|
|
|
|
SourceLocation WhileStatement::getWhileLocation() const{
|
|
return _WhileLoc;
|
|
}
|
|
|
|
void WhileStatement::setWhileLocation(SourceLocation loc){
|
|
_WhileLoc = loc;
|
|
} |