Ruby 3.3.7p123 (2025-01-15 revision be31f993d7fa0219d85f7b3c694d454da4ecc10b)
prettyprint.h
Go to the documentation of this file.
1
6#ifndef PRISM_PRETTYPRINT_H
7#define PRISM_PRETTYPRINT_H
8
9#include "prism/defines.h"
10
11#include <stdio.h>
12
13#include "prism/ast.h"
14#include "prism/parser.h"
16
24PRISM_EXPORTED_FUNCTION void pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node);
25
26#endif
The abstract syntax tree.
struct pm_node pm_node_t
This is the base structure that represents a node in the syntax tree.
The parser used to parse Ruby source.
struct pm_parser pm_parser_t
The parser used to parse Ruby source.
Definition parser.h:259
A wrapper around a contiguous block of allocated memory.
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.
Macro definitions used throughout the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition defines.h:32
A pm_buffer_t is a simple memory buffer that stores data in a contiguous block of memory.
Definition pm_buffer.h:21