Ruby: prism/prettyprint.h Source File

Ruby 3.3.6p108 (2024-11-05 revision 75015d4c1f6965b5e85e96fb309f1f2129f933c0)

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"
15#include "prism/util/pm_buffer.h"
16
24 PRISM_EXPORTED_FUNCTION void pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node);
25
26#endif
ast.h
The abstract syntax tree.
parser.h
The parser used to parse Ruby source.
pm_buffer.h
A wrapper around a contiguous block of allocated memory.
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.
Definition prettyprint.c:8745
defines.h
Macro definitions used throughout the prism library.
PRISM_EXPORTED_FUNCTION
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition defines.h:32
pm_buffer_t
A pm_buffer_t is a simple memory buffer that stores data in a contiguous block of memory.
Definition pm_buffer.h:21
pm_node
This is the base structure that represents a node in the syntax tree.
Definition ast.h:1061
pm_parser
This struct represents the overall parser.
Definition parser.h:489