Blang/src/lib/Statement/DoStatement.cpp

41 lines
803 B
C++

#include "Statement/DoStatement.hpp"
ExprStatement* DoStatement::getCond(){
return reinterpret_cast<ExprStatement*>(_subExprs[COND]);
}
const ExprStatement* DoStatement::getCond() const{
return getCond();
}
void DoStatement::setCond(ExprStatement* e){
_subExprs[COND] = reinterpret_cast<Statement *>(e);
}
Statement* DoStatement::getBody(){
return _subExprs[BODY];
}
const Statement* DoStatement::getBody() const{
return getBody();
}
void DoStatement::setBody(Statement* s){
_subExprs[BODY] = s;
}
SourceLocation DoStatement::getDoLocation() const{
return _DoLoc;
}
void DoStatement::setDoLocation(SourceLocation loc){
_DoLoc = loc;
}
SourceLocation DoStatement::getWhileLocation() const{
return _WhileLoc;
}
void DoStatement::setWhileLocation(SourceLocation loc){
_WhileLoc = loc;
}