elna/source/result.cpp

31 lines
591 B
C++

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