From 6ccb69c6934b0781029720fa6c47f9422a7e8134 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 20 Jan 2026 12:40:26 -0500 Subject: [PATCH] xo-reader2: + pretty-printing for ParserResult + use in utest --- include/xo/indentlog/print/ppconfig.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/xo/indentlog/print/ppconfig.hpp b/include/xo/indentlog/print/ppconfig.hpp index 67d1831a..10c89639 100644 --- a/include/xo/indentlog/print/ppconfig.hpp +++ b/include/xo/indentlog/print/ppconfig.hpp @@ -16,6 +16,21 @@ namespace xo { * Need one read-only instance of this to invoke pretty printer **/ struct ppconfig { + /** @defgroup ppconfig-ctors ppconfig constructors **/ + ///@{ + + /** config to use pretty printer in degenerate form: + * In this form right margin is absurdly far away, + * so should not be forced to use multiple lines. + * + * Note this won't prevent a printer from returning -1 + **/ + static inline ppconfig ugly() { + return ppconfig { .right_margin_ = 99999999, .indent_width_ = 0, .assert_indent_threshold = 10 }; + } + + ///@} + /** @defgroup ppconfig-instance-vars ppconfig instance variables **/ ///@{