Blang/src/lib/Statement/GotoStatement.cpp

45 lines
773 B
C++
Raw Normal View History

2016-04-22 21:46:31 +02:00
#include "Statement/GotoStatement.hpp"
2016-11-24 12:15:08 +01:00
GotoStatement::GotoStatement(LabelDecl* label, SourceLocation gl, SourceLocation ll):
_label(label),
_gotoLoc(gl)
{
2016-04-22 21:46:31 +02:00
}
2016-11-24 12:15:08 +01:00
LabelDecl *GotoStatement::getLabel()
{
return _label;
2016-04-22 21:46:31 +02:00
}
2016-11-24 12:15:08 +01:00
const LabelDecl *GotoStatement::getLabel() const
{
return _label;
}
2016-04-22 21:46:31 +02:00
2016-11-24 12:15:08 +01:00
void GotoStatement::setLabel(LabelDecl * lbl)
{
_label = lbl;
2016-04-22 21:46:31 +02:00
}
2016-11-24 12:15:08 +01:00
SourceLocation GotoStatement::getGotoLocation() const
{
return _gotoLoc;
2016-04-22 21:46:31 +02:00
}
2016-11-24 12:15:08 +01:00
void GotoStatement::setGotoLocation(SourceLocation loc)
{
_gotoLoc = loc;
2016-04-22 21:46:31 +02:00
}
2016-11-24 12:15:08 +01:00
SourceLocation GotoStatement::getLabelLocation() const
{
if (_Label)
return _Label->getLabelLocation();
2016-04-22 21:46:31 +02:00
}
2016-11-24 12:15:08 +01:00
void GotoStatement::setLabelLocation(SourceLocation loc)
{
if (_Label)
return _Label->setLabelLocation(loc);
2016-04-22 21:46:31 +02:00
}