summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/seattlerb/block_scope.txt
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2023-11-28 15:42:33 -0500
committergit <svn-admin@ruby-lang.org>2023-11-28 21:08:46 +0000
commit04cbcd37b1c18c4db4b9df8d80abb4efec11755c (patch)
treecda45c96254e9720ac53101b74a962f4dace7c8a /test/prism/snapshots/seattlerb/block_scope.txt
parent6310522a9a33c19e963e56a8f87388d802525937 (diff)
[ruby/prism] Add numbered_parameters field to BlockNode and LambdaNode
We are aware at parse time how many numbered parameters we have on a BlockNode or LambdaNode, but prior to this commit, did not store that information anywhere in its own right. The numbered parameters were stored as locals, but this does not distinguish them from other locals that have been set, for example in `a { b = 1; _1 }` there is nothing on the AST that distinguishes b from _1. Consumers such as the compiler need to know information about how many numbered parameters exist to set up their own tables around parameters. Since we have this information at parse time, we should compute it here, instead of deferring the work later on. https://github.com/ruby/prism/commit/bf4a1e124d
Diffstat (limited to 'test/prism/snapshots/seattlerb/block_scope.txt')
-rw-r--r--test/prism/snapshots/seattlerb/block_scope.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/prism/snapshots/seattlerb/block_scope.txt b/test/prism/snapshots/seattlerb/block_scope.txt
index 3a2e23d27f..ef7117bcfd 100644
--- a/test/prism/snapshots/seattlerb/block_scope.txt
+++ b/test/prism/snapshots/seattlerb/block_scope.txt
@@ -24,5 +24,6 @@
│ │ └── closing_loc: (1,7)-(1,8) = "|"
│ ├── body: ∅
│ ├── opening_loc: (1,2)-(1,3) = "{"
- │ └── closing_loc: (1,9)-(1,10) = "}"
+ │ ├── closing_loc: (1,9)-(1,10) = "}"
+ │ └── numbered_parameters: 0
└── flags: ∅