Pretty-print an AST to the given output stream.
(ast, indent=' ', stream=sys.stdout)
| 9 | |
| 10 | |
| 11 | def pprintAst(ast, indent=' ', stream=sys.stdout): |
| 12 | "Pretty-print an AST to the given output stream." |
| 13 | rec_node(ast, 0, indent, stream.write) |
| 14 | |
| 15 | def rec_node(node, level, indent, write): |
| 16 | "Recurse through a node, pretty-printing it." |