This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] fully unify CLI and MI pretty printers

As threatened...

This patch fully unifies the CLI and MI pretty printing code.  It
removes the ability to use a plain function to pretty-print from the
CLI (if you really, really want this, it is trivial to recreate using
a delegating class).

This patch also changes how these objects are instantiated and called.
Now, the value to be printed is passed as an argument to the object's
constructor.  Methods like children and to_string are given no

Finally, cli_pretty_printers and mi_pretty_printers are gone, replaced
with a single pretty_printers array.  This maps regular expressions to
single argument functions taking a value and returning a printer
object (constructors work fine here of course).

I updated the docs and the test suite.  All the Python tests still

I've also attached a rewrite of my libstdc++ pretty-printers.  Please
ignore the deque printer, it is incomplete and bogus.  I tested most
of the other ones.


Attachment: Q
Description: the patch

Attachment: txt00002.txt
Description: libstdc++ printers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]