xo-reader2: + pretty-printing for ParserResult + use in utest
This commit is contained in:
parent
1e7feed897
commit
6ccb69c693
1 changed files with 15 additions and 0 deletions
|
|
@ -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 **/
|
||||
///@{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue