Ruby 3.3.7p123 (2025-01-15 revision be31f993d7fa0219d85f7b3c694d454da4ecc10b)
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.
5typedef 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;
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
28void pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_t *previous, pm_parser_t *parser);
29bool *rb_ruby_prism_ptr(void);
struct pm_node pm_node_t
This is the base structure that represents a node in the syntax tree.
struct pm_parser pm_parser_t
The parser used to parse Ruby source.
Definition parser.h:259
The main header file for the prism parser.
A list of constant IDs.
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52