elna/source/result.cpp

34 lines
585 B
C++

#include "elna/result.hpp"
namespace elna
{
namespace source
{
error::error(const char *message, const source::position position) noexcept
{
this->message = message;
this->position = position;
}
char const *error::what() const noexcept
{
return this->message;
}
std::size_t error::line() const noexcept
{
return this->position.line;
}
std::size_t error::column() const noexcept
{
return this->position.column;
}
}
Symbol::Symbol(const char *name)
{
this->name = name;
}
}