elna/boot/result.cc

40 lines
1.1 KiB
C++
Raw Normal View History

/* Miscellaneous types used across stage boundaries.
Copyright (C) 2025 Free Software Foundation, Inc.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
2025-01-31 09:46:17 +01:00
#include "elna/boot/result.h"
2024-12-21 00:08:48 +01:00
2024-12-23 13:54:11 +01:00
namespace elna
{
2025-01-31 09:46:17 +01:00
namespace boot
2024-12-21 00:08:48 +01:00
{
2024-12-27 23:38:25 +01:00
error::error(const char *path, const struct position position)
: position(position), path(path)
2024-12-21 00:08:48 +01:00
{
}
std::size_t error::line() const noexcept
{
2024-12-27 23:38:25 +01:00
return this->position.line;
2024-12-21 00:08:48 +01:00
}
std::size_t error::column() const noexcept
{
2024-12-27 23:38:25 +01:00
return this->position.column;
2024-12-21 00:08:48 +01:00
}
}
2024-12-23 13:54:11 +01:00
}