aboutsummaryrefslogtreecommitdiff
path: root/boot/result.cc
diff options
context:
space:
mode:
Diffstat (limited to 'boot/result.cc')
-rw-r--r--boot/result.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/boot/result.cc b/boot/result.cc
index 2222bd5..90d0ad6 100644
--- a/boot/result.cc
+++ b/boot/result.cc
@@ -19,19 +19,24 @@ along with GCC; see the file COPYING3. If not see
namespace elna::boot
{
- error::error(const struct position position)
- : position(position)
+ location::location(std::size_t line, std::size_t column)
+ : line(line), column(column)
{
}
- std::size_t error::line() const noexcept
+ bool location::available() const
{
- return this->position.line;
+ return this->line != 0 || this->column != 0;
}
- std::size_t error::column() const noexcept
+ position::position(location start, location end)
+ : start(start), end(end)
+ {
+ }
+
+ error::error(const struct position position)
+ : position(position)
{
- return this->position.column;
}
std::deque<std::unique_ptr<error>>& error_container::errors()