Blang/src/include/Statement/GotoStatement.hpp

30 lines
612 B
C++

#ifndef GOTOSTATEMENT_HPP
#define GOTOSTATEMENT_HPP
#include "Statement.hpp"
#include "LabelStatement.hpp"
#include "SourceLocation.hpp"
class GotoStatement : public Statement
{
public:
GotoStatement(LabelDecl* label, SourceLocation gl, SourceLocation ll);
LabelDecl *getLabel();
const LabelDecl *getLabel() const;
void setLabel(LabelDecl *);
SourceLocation getGotoLocation() const;
void setGotoLocation(SourceLocation);
SourceLocation getLabelLocation() const;
void setLabelLocation(SourceLocation);
private:
SourceLocation _gotoLoc;
LabelDecl *_label;
};
#endif