Ruby 3.4.3p32 (2025-04-14 revision d0b7e5b6a04bde21ca483d20a1546b28b401c2d4)
prettyprint.h File Reference

An AST node pretty-printer. More...

#include "prism/defines.h"
#include <stdio.h>
#include "prism/ast.h"
#include "prism/parser.h"
#include "prism/util/pm_buffer.h"

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)
 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.

Definition at line 8903 of file prettyprint.c.