justinpombrio / partial-pretty-printer

A pretty printing library for formatting source code in any language, which can efficiently print just part of a document.
Apache License 2.0
3 stars 0 forks source link

Generalize notation conditionals #18

Closed e-matteson closed 8 months ago

e-matteson commented 8 months ago

This PR replaces Notation::IfEmptyText with Notation::Check, which can take a generic Condition type. That allows the PrettyDoc implementer to make their notations check whatever node properties they want.