module documentation

Conversion of parse tree nodes to strings.

Class StrConv Visitor for converting a node to a human-readable string.
Function dump_tagged Convert an array into a pretty-printed multiline string representation.
Function indent Indent all the lines in s (separated by newlines) by n spaces.
def dump_tagged(nodes: Sequence[object], tag: str|None, str_conv: StrConv) -> str: (source)

Convert an array into a pretty-printed multiline string representation. The format is tag( item1.. itemN) Individual items are formatted like this: - arrays are flattened - pairs (str, array) are converted recursively, so that str is the tag - other items are converted to strings and indented

def indent(s: str, n: int) -> str: (source)

Indent all the lines in s (separated by newlines) by n spaces.