refactor(parser): add print operator to AST error

This commit is contained in:
2026-06-03 10:53:34 +02:00
parent 26340c279d
commit cf9c53a9e8
2 changed files with 16 additions and 3 deletions
+9
View File
@@ -36,6 +36,15 @@ struct error {
* @return true if the errors are not equal.
*/
bool operator!=(const error& other) const { return !this->operator==(other); }
/**
* @brief Prints an AST error to output stream.
*
* @param os Output stream.
* @param error AST error to print.
* @return The output stream.
*/
friend std::ostream& operator<<(std::ostream& os, const error& error);
};
class node;