Ruby 4.1.0dev (2026-05-16 revision c1f48f4a1b1b6de9528fb372565f1bb82fcdaa3c)
json.h
Go to the documentation of this file.
1
4#ifndef PRISM_JSON_H
5#define PRISM_JSON_H
6
7#include "prism/excludes.h"
8
9/* We optionally support dumping to JSON. For systems that don't want or need
10 * this functionality, it can be turned off with the PRISM_EXCLUDE_JSON define.
11 */
12#ifndef PRISM_EXCLUDE_JSON
13
16
17#include "prism/ast.h"
18#include "prism/buffer.h"
19#include "prism/parser.h"
20
28PRISM_EXPORTED_FUNCTION void pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *node) PRISM_NONNULL(1, 2, 3);
29
30#endif
31
32#endif
A header file that defines macros to exclude certain features of the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition exported.h:20
PRISM_EXPORTED_FUNCTION void pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *node) PRISM_NONNULL(1
Dump JSON to the given buffer.
The parser used to parse Ruby source.
A wrapper around a contiguous block of allocated memory.
#define PRISM_NONNULL(...)
Mark the parameters of a function as non-null.
Definition nonnull.h:13
This is the base structure that represents a node in the syntax tree.
Definition ast.h:1065