diff options
author | Matt Valentine-House <[email protected]> | 2023-10-06 14:29:47 +0100 |
---|---|---|
committer | git <[email protected]> | 2023-10-09 10:16:01 +0000 |
commit | 0fdee133fccbd34af31f5f4ca530838920d8fc06 (patch) | |
tree | 9bb2f4bf0be5233c3c7cedfc45d6f5bb59ce23f0 /prism/node.h | |
parent | 8c2a4932331987586d583fa58a6e80920c6743c5 (diff) |
[ruby/prism] Attach the ast node to the scope
So when building instruction sequences for a scope we can reference
items from the ast node that requires the scope. This is useful for for
loops, where the local variable tables from the parent scope will need
to be referenced.
https://github.com/ruby/prism/commit/426b1ca094
Diffstat (limited to 'prism/node.h')
-rw-r--r-- | prism/node.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/prism/node.h b/prism/node.h index a532badef8..cbfed1b7c9 100644 --- a/prism/node.h +++ b/prism/node.h @@ -33,6 +33,7 @@ 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; + pm_node_t *ast_node; struct pm_parameters_node *parameters; pm_node_t *body; pm_constant_id_list_t locals; |