Module builder

Source
Expand description

This module defines the data structures and functions used to draw trees.

Structs§

TreeBuilder
A builder struct for formatting AST nodes.

Functions§

format
Very inefficiently formats the given node and children into a tree by indenting every line.
print_ast_list_generic
A function used by TreeBuilder::list and TreeBuilder::list_map for list formatting. Also see print_ast_list_without_node_name.
print_ast_list_without_node_name
A lower-level function behind print_ast_list_generic that actually does the formatting. Useful for manually implementing AstToStr for Vec-like types.