Prints AST node, assuming priority context.
Prints sequence of statements in braces.
Prints integer.
Prints text.
Current indentation level
Prints newline and then prints enough spaces to reach current indentation level.
Prints body.
Prints body. If guard is true, between parentheses.
Turns an abstract syntax tree back into a string.
To create a pretty printer, use the companion object’s
toPrintWriter
method.The pretty printer is a helper component in the language implementation. It can be used during debugging to print out abstract syntax trees for manual inspection.