4 * An AST node pretty-printer.
6 #ifndef PRISM_PRETTYPRINT_H
7 #define PRISM_PRETTYPRINT_H
9 #include "prism/defines.h"
11 #ifdef PRISM_EXCLUDE_PRETTYPRINT
13 void pm_prettyprint(void);
19 #include "prism/ast.h"
20 #include "prism/parser.h"
21 #include "prism/util/pm_buffer.h"
24 * Pretty-prints the AST represented by the given node to the given buffer.
26 * @param output_buffer The buffer to write the pretty-printed AST to.
27 * @param parser The parser that parsed the AST.
28 * @param node The root node of the AST to pretty-print.
30 PRISM_EXPORTED_FUNCTION
void pm_prettyprint(pm_buffer_t
*output_buffer
, const pm_parser_t
*parser
, const pm_node_t
*node
);