35 lines
460 B
C++
35 lines
460 B
C++
#ifndef SOURCELOCATION_HPP
|
|
#define SOURCELOCATION_HPP
|
|
|
|
#include <string>
|
|
|
|
class SourceLocation{
|
|
public:
|
|
|
|
bool isValid() const;
|
|
void print() const;
|
|
std::string printToString() const;
|
|
|
|
std::string file();
|
|
void setFile(std::string);
|
|
|
|
int lineLocation();
|
|
void setLineLocation(int);
|
|
|
|
int columnLocation();
|
|
void setColumnLocation(int);
|
|
|
|
int offset();
|
|
void setOffset(int);
|
|
|
|
private:
|
|
std::string _file;
|
|
int _offset;
|
|
|
|
int _column;
|
|
int _line;
|
|
|
|
};
|
|
|
|
#endif
|