refactor(AST): improve AST node print operator

This commit is contained in:
2026-06-03 16:10:35 +02:00
parent ab6b65a70e
commit 02ce25df2d
+3 -1
View File
@@ -125,7 +125,9 @@ public:
* @param node Node to print.
* @return The output stream.
*/
friend std::ostream& operator<<(std::ostream& os, const node& node) { return node.print(os); }
friend std::ostream& operator<<(std::ostream& os, const node& node) {
return node.print(os << node.location() << ": ");
}
protected:
/**
* @brief Compares two nodes for equality.