Ruby 4.1.0dev (2026-11-18 revision e5e6cd45db456b2a4d368f2a34598641319df630)
prettyprint.h File Reference

(e5e6cd45db456b2a4d368f2a34598641319df630)

An AST node pretty-printer. More...

#include "prism/excludes.h"
#include "prism/compiler/exported.h"
#include "prism/compiler/nonnull.h"
#include "prism/ast.h"
#include "prism/buffer.h"
#include "prism/parser.h"
Include dependency graph for prettyprint.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PRISM_EXPORTED_FUNCTION void pm_prettyprint (pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node) PRISM_NONNULL(1
 Pretty-prints the AST represented by the given node to the given buffer.

Detailed Description

An AST node pretty-printer.

Definition in file prettyprint.h.

Function Documentation

◆ pm_prettyprint()

PRISM_EXPORTED_FUNCTION void pm_prettyprint ( pm_buffer_t * output_buffer,
const pm_parser_t * parser,
const pm_node_t * node )

Pretty-prints the AST represented by the given node to the given buffer.

Parameters
output_bufferThe buffer to write the pretty-printed AST to.
parserThe parser that parsed the AST.
nodeThe root node of the AST to pretty-print.