28 std::string m_srcfile;
33 Location(
const std::string &srcfile,
int line,
int col);
39 bool is_valid()
const {
return m_line > 0; }
41 std::string get_srcfile()
const {
return m_srcfile; }
42 int get_line()
const {
return m_line; }
43 int get_col()
const {
return m_col; }
45 void advance(
int num_cols) { m_col += num_cols; }
47 void next_line() { m_line++; m_col = 1; }
Definition: location.h:26