sapphire/src/Location.h

25 lines
475 B
C
Raw Normal View History

#pragma once
#include <string>
#include <memory>
struct Location
{
int line;
int column;
std::string fname;
std::shared_ptr<Location> parent = nullptr;
Location(int ln, int col, std::string file);
~Location();
std::string to_string() const;
std::string to_parenthesized_string() const;
void advance();
void pos_from_char(const char& character);
void operator=(const Location& other);
void copy(const Location& other);
};