Ruby  3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
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 #ifdef PRISM_EXCLUDE_PRETTYPRINT
12 
13 void pm_prettyprint(void);
14 
15 #else
16 
17 #include <stdio.h>
18 
19 #include "prism/ast.h"
20 #include "prism/parser.h"
21 #include "prism/util/pm_buffer.h"
22 
30 PRISM_EXPORTED_FUNCTION void pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node);
31 
32 #endif
33 
34 #endif
The abstract syntax tree.
The parser used to parse Ruby source.
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.
Definition: prettyprint.c:8871
Macro definitions used throughout the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition: defines.h:50
A pm_buffer_t is a simple memory buffer that stores data in a contiguous block of memory.
Definition: pm_buffer.h:22
This is the base structure that represents a node in the syntax tree.
Definition: ast.h:1069
This struct represents the overall parser.
Definition: parser.h:640