elna/shell/result.cpp

26 lines
526 B
C++

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