From 67a987f82bc8a2b7ec15581306873530821fcf9e Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Mon, 16 Oct 2023 14:28:17 -0700 Subject: [ruby/prism] Change ScopeNode to point to previous ScopeNode Amend ScopeNode to point to previous ScopeNode, and to have void* pointers to constants and index_lookup_table https://github.com/ruby/prism/commit/0534324312 --- prism/node.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'prism/node.h') diff --git a/prism/node.h b/prism/node.h index cbfed1b7c9..403e84e0d3 100644 --- a/prism/node.h +++ b/prism/node.h @@ -33,10 +33,17 @@ PRISM_EXPORTED_FUNCTION const char * pm_node_type_to_str(pm_node_type_t node_typ // declare them here to avoid generating them. typedef struct pm_scope_node { pm_node_t base; + struct pm_scope_node *previous; pm_node_t *ast_node; struct pm_parameters_node *parameters; pm_node_t *body; pm_constant_id_list_t locals; + pm_parser_t *parser; + + // We don't have the CRuby types ID and st_table within Prism + // so we use void * + void *constants; // ID *constants + void *index_lookup_table; // st_table *index_lookup_table } pm_scope_node_t; #endif // PRISM_NODE_H -- cgit v1.2.3