Ruby
3.3.5p100 (2024-09-03 revision ef084cc8f4958c1b6e4ead99136631bef6d8ddba)
prism_compile.h
1
#include "
prism/prism.h
"
2
3
// ScopeNodes are helper nodes, and will never be part of the AST. We manually
4
// declare them here to avoid generating them.
5
typedef
struct
pm_scope_node
{
6
pm_node_t
base;
7
struct
pm_scope_node
*previous;
8
pm_node_t
*ast_node;
9
pm_node_t
*parameters;
10
pm_node_t
*body;
11
pm_constant_id_list_t
locals;
12
pm_parser_t
*parser;
13
14
// The size of the local table
15
// on the iseq which includes
16
// locals and hidden variables
17
int
local_table_for_iseq_size;
18
19
ID
*constants;
20
st_table
*index_lookup_table;
21
22
// Some locals are defined at higher scopes than they are used. We can use
23
// this offset to control which parent scopes local table we should be
24
// referencing from the current scope.
25
unsigned
int
local_depth_offset;
26
}
pm_scope_node_t
;
27
28
void
pm_scope_node_init(
const
pm_node_t
*node,
pm_scope_node_t
*scope,
pm_scope_node_t
*previous,
pm_parser_t
*parser);
29
bool
*rb_ruby_prism_ptr(
void
);
prism.h
The main header file for the prism parser.
pm_constant_id_list_t
A list of constant IDs.
Definition
pm_constant_pool.h:29
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
pm_scope_node
Definition
prism_compile.h:5
st_table
Definition
st.h:79
ID
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition
value.h:52
Generated by
1.12.0