diff options
author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-04 16:40:59 -0500 |
---|---|---|
committer | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-06 09:55:48 -0500 |
commit | 018dbf18d50b34a3ea564bfe0264a423de4b33bb (patch) | |
tree | 366e75c39f9061d853830bb602276b1f893db1ce /test/prism/snapshots/unparser/corpus/semantic/block.txt | |
parent | da1519b223e1accfcef1c831f9fdc6421724ea7c (diff) |
[ruby/prism] Add locals_body_index to DefNode, BlockNode, LambdaNode
The locals_body_index gives the index in the locals array where
the locals from the body start. This allows compilers to easily
index past the parameters in the locals array.
https://github.com/ruby/prism/commit/5d4627b890
Diffstat (limited to 'test/prism/snapshots/unparser/corpus/semantic/block.txt')
-rw-r--r-- | test/prism/snapshots/unparser/corpus/semantic/block.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/prism/snapshots/unparser/corpus/semantic/block.txt b/test/prism/snapshots/unparser/corpus/semantic/block.txt index f3d5440a59..94f03c9746 100644 --- a/test/prism/snapshots/unparser/corpus/semantic/block.txt +++ b/test/prism/snapshots/unparser/corpus/semantic/block.txt @@ -14,6 +14,7 @@ │ ├── block: │ │ @ BlockNode (location: (1,4)-(2,3)) │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 │ │ ├── parameters: ∅ │ │ ├── body: ∅ │ │ ├── opening_loc: (1,4)-(1,6) = "do" @@ -30,6 +31,7 @@ │ ├── block: │ │ @ BlockNode (location: (4,4)-(6,3)) │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 │ │ ├── parameters: ∅ │ │ ├── body: │ │ │ @ BeginNode (location: (5,0)-(6,3)) @@ -60,6 +62,7 @@ │ ├── block: │ │ @ BlockNode (location: (8,4)-(11,3)) │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 │ │ ├── parameters: ∅ │ │ ├── body: │ │ │ @ StatementsNode (location: (9,2)-(10,5)) @@ -85,6 +88,7 @@ │ ├── block: │ │ @ BlockNode (location: (13,4)-(14,3)) │ │ ├── locals: [:a] + │ │ ├── locals_body_index: 1 │ │ ├── parameters: │ │ │ @ BlockParametersNode (location: (13,7)-(13,10)) │ │ │ ├── parameters: @@ -125,6 +129,7 @@ │ ├── block: │ │ @ BlockNode (location: (16,12)-(20,3)) │ │ ├── locals: [:a] + │ │ ├── locals_body_index: 1 │ │ ├── parameters: │ │ │ @ BlockParametersNode (location: (16,15)-(16,18)) │ │ │ ├── parameters: @@ -170,6 +175,7 @@ ├── block: │ @ BlockNode (location: (22,12)-(26,3)) │ ├── locals: [] + │ ├── locals_body_index: 0 │ ├── parameters: ∅ │ ├── body: │ │ @ StatementsNode (location: (25,2)-(25,3)) |