roza/lib/SrcLoc.hpp

26 lines
444 B
C++
Raw Normal View History

2023-08-30 18:06:26 +00:00
#ifndef roza_SRCLOC_HPP
#define roza_SRCLOC_HPP
#include <filesystem>
namespace roza
{
class SrcLoc
{
public:
explicit SrcLoc(std::filesystem::path source_file = "???", int line=1);
virtual ~SrcLoc();
std::filesystem::path source_file() const { return m_source_file; }
int line() const { return m_line; }
void set_line(int line);
private:
std::filesystem::path m_source_file;
int m_line;
};
}
#endif