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.
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;
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);
The main header file for the prism parser.
A list of constant IDs.
This is the base structure that represents a node in the syntax tree.
Definition ast.h:1061
This struct represents the overall parser.
Definition parser.h:489
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52