xo-reader2: + pretty-printing for ParserResult + use in utest

This commit is contained in:
Roland Conybeare 2026-01-20 12:40:26 -05:00
commit 4536fa5000

View file

@ -279,6 +279,15 @@ namespace xo {
///@}
};
inline std::ostream & operator<<(std::ostream & os, const DString * x) {
if (x) {
os << std::string_view(*x);
} else {
os << "nullptr";
}
return os;
}
inline bool operator==(const DString & lhs, const DString & rhs) {
return DString::compare(lhs, rhs) == 0;
}