summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prism/node.h1
-rw-r--r--prism/prism.c1
2 files changed, 2 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;
diff --git a/prism/prism.c b/prism/prism.c
index 9b8ee23253..c43f2687d0 100644
--- a/prism/prism.c
+++ b/prism/prism.c
@@ -669,6 +669,7 @@ pm_scope_node_init(pm_node_t *node, pm_scope_node_t *scope) {
scope->base.location.start = node->location.start;
scope->base.location.end = node->location.end;
+ scope->ast_node = node;
scope->parameters = NULL;
scope->body = NULL;
pm_constant_id_list_init(&scope->locals);