From 0cabcf2f2cdf0eb4284084aebc8f4eedd3c2538b Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 19 Jul 2025 11:47:03 -0500 Subject: [PATCH] pretty printing -- copmlete for xo::ast::GeneralizedExpression --- include/xo/flatstring/flatstring.hpp | 1 + include/xo/flatstring/flatstring_pretty.hpp | 28 +++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 include/xo/flatstring/flatstring_pretty.hpp diff --git a/include/xo/flatstring/flatstring.hpp b/include/xo/flatstring/flatstring.hpp index a332950..947d70d 100644 --- a/include/xo/flatstring/flatstring.hpp +++ b/include/xo/flatstring/flatstring.hpp @@ -636,6 +636,7 @@ namespace xo { return ((s1 <=> s2) == std::strong_ordering::equal); } ///@} + } /*namespace xo*/ /** end flatstring.hpp **/ diff --git a/include/xo/flatstring/flatstring_pretty.hpp b/include/xo/flatstring/flatstring_pretty.hpp new file mode 100644 index 0000000..2474a3a --- /dev/null +++ b/include/xo/flatstring/flatstring_pretty.hpp @@ -0,0 +1,28 @@ +/** @file flatstring_pretty.hpp + * + * Author: Roland Conybeare, Jul 2025 + **/ + +#pragma once + +#include "flatstring.hpp" +#include "flatstring_iostream.hpp" +#include "xo/indentlog/print/ppdetail_atomic.hpp" + +namespace xo { +#ifndef ppdetail_atomic + namespace print { + struct ppindentinfo; + + template + struct ppdetail> { + static bool print_pretty(const ppindentinfo & ppii, + const flatstring & x) { + return ppdetail_atomic>::print_pretty(ppii, x); + }; + }; + } +#endif +} + +/** end flatstring_pretty.hpp **/