From 6ce2fba9d2c7ae4386ce83fd96842693cab30a78 Mon Sep 17 00:00:00 2001 From: CHatingPython Date: Wed, 3 Jun 2026 10:43:25 +0200 Subject: [PATCH] docs: document token error --- furc/include/furc/front/token.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/furc/include/furc/front/token.hpp b/furc/include/furc/front/token.hpp index 8ebd1ea..f9483c7 100644 --- a/furc/include/furc/front/token.hpp +++ b/furc/include/furc/front/token.hpp @@ -175,7 +175,7 @@ using integer_token = std::uint64_t; /**< Integer token. */ * @brief Token. */ struct token { - location location; + location location; /**< Token location. */ token_t type = token_t::None; /**< Token type. */ /** @@ -342,10 +342,22 @@ struct token_error { token_error_t type; /**< Error type. */ std::string message; /**< Error message. */ + /** + * @brief Compares two token errors for equality. + * + * @param rhs Error to compare against. + * @return true if the errors are equal. + */ bool operator==(const token_error& rhs) const { return location == rhs.location && type == rhs.type && message == rhs.message; } + /** + * @brief Compares two token errors for inequality. + * + * @param rhs Error to compare against. + * @return true if the errors are not equal. + */ bool operator!=(const token_error& rhs) const { return !this->operator==(rhs); } };