JuliaLang/julia — pull request #1161 by toivoh (2012-08-15 12:21:30+00:00)
Title: RFC: Pretty printing for AST:s (Eager version)

Updated version of https://github.com/JuliaLang/julia/pull/1144

I've rewritten the pretty printing machinery to be eager: no more temporary indent/comma_list/etc objects.
What remains is
* `IndentIO`: wraps an `IO`, keeps a running `indent` value that is increased/decreased as printing
enters/leaves an indentation level.
* `@pprint`: convenience macro to write eager printing code in a more terse and readable format.

You guys will have to say how you like this new lineup.
(Someone might have comments on the @pprint syntax, for instance :)

The example works as before: https://gist.github.com/3312906