summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/unparser
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/unparser
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/unparser')
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/block.txt90
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defs.txt3
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/dstr.txt3
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/if.txt3
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/lambda.txt18
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/literal.txt3
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/send.txt3
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/since/27.txt45
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/super.txt15
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/while.txt15
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/block.txt18
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/while.txt12
12 files changed, 145 insertions, 83 deletions
diff --git a/test/prism/snapshots/unparser/corpus/literal/block.txt b/test/prism/snapshots/unparser/corpus/literal/block.txt
index b88e5f23a1..76d51d709e 100644
--- a/test/prism/snapshots/unparser/corpus/literal/block.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/block.txt
@@ -17,7 +17,8 @@
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,4)-(1,5) = "{"
- │ │ └── closing_loc: (2,0)-(2,1) = "}"
+ │ │ ├── closing_loc: (2,0)-(2,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (3,0)-(4,1))
│ ├── receiver: ∅
@@ -48,7 +49,8 @@
│ │ │ └── closing_loc: (3,8)-(3,9) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (3,4)-(3,5) = "{"
- │ │ └── closing_loc: (4,0)-(4,1) = "}"
+ │ │ ├── closing_loc: (4,0)-(4,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (5,0)-(6,1))
│ ├── receiver: ∅
@@ -83,7 +85,8 @@
│ │ │ └── closing_loc: (5,9)-(5,10) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (5,4)-(5,5) = "{"
- │ │ └── closing_loc: (6,0)-(6,1) = "}"
+ │ │ ├── closing_loc: (6,0)-(6,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (7,0)-(8,1))
│ ├── receiver: ∅
@@ -120,7 +123,8 @@
│ │ │ └── closing_loc: (7,12)-(7,13) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (7,4)-(7,5) = "{"
- │ │ └── closing_loc: (8,0)-(8,1) = "}"
+ │ │ ├── closing_loc: (8,0)-(8,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (9,0)-(10,1))
│ ├── receiver: ∅
@@ -153,7 +157,8 @@
│ │ │ └── closing_loc: (9,11)-(9,12) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (9,4)-(9,5) = "{"
- │ │ └── closing_loc: (10,0)-(10,1) = "}"
+ │ │ ├── closing_loc: (10,0)-(10,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (11,0)-(13,1))
│ ├── receiver: ∅
@@ -177,7 +182,8 @@
│ │ │ └── body: (length: 1)
│ │ │ └── @ NilNode (location: (12,2)-(12,5))
│ │ ├── opening_loc: (11,7)-(11,8) = "{"
- │ │ └── closing_loc: (13,0)-(13,1) = "}"
+ │ │ ├── closing_loc: (13,0)-(13,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (14,0)-(16,1))
│ ├── receiver: ∅
@@ -215,7 +221,8 @@
│ │ │ └── body: (length: 1)
│ │ │ └── @ NilNode (location: (15,2)-(15,5))
│ │ ├── opening_loc: (14,4)-(14,5) = "{"
- │ │ └── closing_loc: (16,0)-(16,1) = "}"
+ │ │ ├── closing_loc: (16,0)-(16,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (17,0)-(19,1))
│ ├── receiver: ∅
@@ -253,7 +260,8 @@
│ │ │ └── body: (length: 1)
│ │ │ └── @ NilNode (location: (18,2)-(18,5))
│ │ ├── opening_loc: (17,4)-(17,5) = "{"
- │ │ └── closing_loc: (19,0)-(19,1) = "}"
+ │ │ ├── closing_loc: (19,0)-(19,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (20,0)-(22,1))
│ ├── receiver: ∅
@@ -281,7 +289,8 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ ├── opening_loc: (20,4)-(20,5) = "{"
- │ │ └── closing_loc: (22,0)-(22,1) = "}"
+ │ │ ├── closing_loc: (22,0)-(22,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (23,0)-(25,1))
│ ├── receiver:
@@ -344,7 +353,8 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ ├── opening_loc: (23,8)-(23,9) = "{"
- │ │ └── closing_loc: (25,0)-(25,1) = "}"
+ │ │ ├── closing_loc: (25,0)-(25,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (26,0)-(27,1))
│ ├── receiver:
@@ -389,7 +399,8 @@
│ │ │ └── closing_loc: (26,16)-(26,17) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (26,8)-(26,9) = "{"
- │ │ └── closing_loc: (27,0)-(27,1) = "}"
+ │ │ ├── closing_loc: (27,0)-(27,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (28,0)-(29,1))
│ ├── receiver:
@@ -432,7 +443,8 @@
│ │ │ └── closing_loc: (28,15)-(28,16) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (28,8)-(28,9) = "{"
- │ │ └── closing_loc: (29,0)-(29,1) = "}"
+ │ │ ├── closing_loc: (29,0)-(29,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (30,0)-(31,1))
│ ├── receiver:
@@ -467,7 +479,8 @@
│ │ │ └── closing_loc: (30,17)-(30,18) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (30,8)-(30,9) = "{"
- │ │ └── closing_loc: (31,0)-(31,1) = "}"
+ │ │ ├── closing_loc: (31,0)-(31,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (32,0)-(34,1))
│ ├── receiver:
@@ -522,7 +535,8 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ ├── opening_loc: (32,8)-(32,9) = "{"
- │ │ └── closing_loc: (34,0)-(34,1) = "}"
+ │ │ ├── closing_loc: (34,0)-(34,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (35,0)-(37,1))
│ ├── receiver:
@@ -582,7 +596,8 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ ├── opening_loc: (35,8)-(35,9) = "{"
- │ │ └── closing_loc: (37,0)-(37,1) = "}"
+ │ │ ├── closing_loc: (37,0)-(37,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (38,0)-(40,1))
│ ├── receiver:
@@ -648,7 +663,8 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ ├── opening_loc: (38,8)-(38,9) = "{"
- │ │ └── closing_loc: (40,0)-(40,1) = "}"
+ │ │ ├── closing_loc: (40,0)-(40,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (41,0)-(43,1))
│ ├── receiver:
@@ -716,7 +732,8 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ ├── opening_loc: (41,8)-(41,9) = "{"
- │ │ └── closing_loc: (43,0)-(43,1) = "}"
+ │ │ ├── closing_loc: (43,0)-(43,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (44,0)-(46,1))
│ ├── receiver:
@@ -777,7 +794,8 @@
│ │ │ ├── block: ∅
│ │ │ └── flags: variable_call
│ │ ├── opening_loc: (44,8)-(44,9) = "{"
- │ │ └── closing_loc: (46,0)-(46,1) = "}"
+ │ │ ├── closing_loc: (46,0)-(46,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (47,0)-(48,5))
│ ├── receiver:
@@ -805,7 +823,8 @@
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (47,8)-(47,9) = "{"
- │ │ │ └── closing_loc: (48,0)-(48,1) = "}"
+ │ │ │ ├── closing_loc: (48,0)-(48,1) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── call_operator_loc: (48,1)-(48,2) = "."
│ ├── name: :baz
@@ -848,7 +867,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (51,0)-(51,3) = "end"
│ │ ├── opening_loc: (49,2)-(49,4) = "do"
- │ │ └── closing_loc: (51,0)-(51,3) = "end"
+ │ │ ├── closing_loc: (51,0)-(51,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (52,0)-(56,3))
│ ├── receiver: ∅
@@ -900,7 +920,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (56,0)-(56,3) = "end"
│ │ ├── opening_loc: (52,2)-(52,4) = "do"
- │ │ └── closing_loc: (56,0)-(56,3) = "end"
+ │ │ ├── closing_loc: (56,0)-(56,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (57,0)-(61,3))
│ ├── receiver: ∅
@@ -969,7 +990,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (61,0)-(61,3) = "end"
│ │ ├── opening_loc: (57,2)-(57,4) = "do"
- │ │ └── closing_loc: (61,0)-(61,3) = "end"
+ │ │ ├── closing_loc: (61,0)-(61,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (62,0)-(66,3))
│ ├── receiver: ∅
@@ -1041,7 +1063,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (66,0)-(66,3) = "end"
│ │ ├── opening_loc: (62,2)-(62,4) = "do"
- │ │ └── closing_loc: (66,0)-(66,3) = "end"
+ │ │ ├── closing_loc: (66,0)-(66,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (67,0)-(71,3))
│ ├── receiver: ∅
@@ -1108,7 +1131,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (71,0)-(71,3) = "end"
│ │ ├── opening_loc: (67,2)-(67,4) = "do"
- │ │ └── closing_loc: (71,0)-(71,3) = "end"
+ │ │ ├── closing_loc: (71,0)-(71,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (72,0)-(75,3))
│ ├── receiver: ∅
@@ -1152,7 +1176,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (75,0)-(75,3) = "end"
│ │ ├── opening_loc: (72,2)-(72,4) = "do"
- │ │ └── closing_loc: (75,0)-(75,3) = "end"
+ │ │ ├── closing_loc: (75,0)-(75,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (76,0)-(81,3))
│ ├── receiver: ∅
@@ -1210,7 +1235,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (81,0)-(81,3) = "end"
│ │ ├── opening_loc: (76,2)-(76,4) = "do"
- │ │ └── closing_loc: (81,0)-(81,3) = "end"
+ │ │ ├── closing_loc: (81,0)-(81,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (82,0)-(86,3))
│ ├── receiver: ∅
@@ -1280,7 +1306,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (86,0)-(86,3) = "end"
│ │ ├── opening_loc: (82,2)-(82,4) = "do"
- │ │ └── closing_loc: (86,0)-(86,3) = "end"
+ │ │ ├── closing_loc: (86,0)-(86,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (87,0)-(89,3))
│ ├── receiver: ∅
@@ -1307,7 +1334,8 @@
│ │ │ │ └── end_keyword_loc: (89,0)-(89,3) = "end"
│ │ │ └── end_keyword_loc: (89,0)-(89,3) = "end"
│ │ ├── opening_loc: (87,2)-(87,4) = "do"
- │ │ └── closing_loc: (89,0)-(89,3) = "end"
+ │ │ ├── closing_loc: (89,0)-(89,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (90,0)-(93,3))
│ ├── receiver: ∅
@@ -1341,7 +1369,8 @@
│ │ │ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
│ │ │ └── end_keyword_loc: (93,0)-(93,3) = "end"
│ │ ├── opening_loc: (90,2)-(90,4) = "do"
- │ │ └── closing_loc: (93,0)-(93,3) = "end"
+ │ │ ├── closing_loc: (93,0)-(93,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
└── @ CallNode (location: (94,0)-(96,1))
├── receiver: ∅
@@ -1378,5 +1407,6 @@
│ │ ├── block: ∅
│ │ └── flags: ∅
│ ├── opening_loc: (94,4)-(94,5) = "{"
- │ └── closing_loc: (96,0)-(96,1) = "}"
+ │ ├── closing_loc: (96,0)-(96,1) = "}"
+ │ └── numbered_parameters: 2
└── flags: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/defs.txt b/test/prism/snapshots/unparser/corpus/literal/defs.txt
index 52cd344710..0f6a2de064 100644
--- a/test/prism/snapshots/unparser/corpus/literal/defs.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/defs.txt
@@ -141,7 +141,8 @@
│ │ │ │ │ └── closing_loc: (17,15)-(17,16) = "|"
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (17,9)-(17,10) = "{"
- │ │ │ │ └── closing_loc: (18,0)-(18,1) = "}"
+ │ │ │ │ ├── closing_loc: (18,0)-(18,1) = "}"
+ │ │ │ │ └── numbered_parameters: 0
│ │ │ └── flags: ∅
│ │ ├── opening_loc: (17,4)-(17,5) = "("
│ │ └── closing_loc: (18,1)-(18,2) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/literal/dstr.txt b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
index 33391fe56e..13c3a74486 100644
--- a/test/prism/snapshots/unparser/corpus/literal/dstr.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/dstr.txt
@@ -335,5 +335,6 @@
│ │ └── closing_loc: (34,20)-(34,21) = "|"
│ ├── body: ∅
│ ├── opening_loc: (34,16)-(34,17) = "{"
- │ └── closing_loc: (37,0)-(37,1) = "}"
+ │ ├── closing_loc: (37,0)-(37,1) = "}"
+ │ └── numbered_parameters: 0
└── flags: ∅
diff --git a/test/prism/snapshots/unparser/corpus/literal/if.txt b/test/prism/snapshots/unparser/corpus/literal/if.txt
index 4cd56d5a6b..97fa18b9d9 100644
--- a/test/prism/snapshots/unparser/corpus/literal/if.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/if.txt
@@ -254,7 +254,8 @@
│ │ │ ├── name: :pair
│ │ │ └── depth: 0
│ │ ├── opening_loc: (31,7)-(31,8) = "{"
- │ │ └── closing_loc: (33,0)-(33,1) = "}"
+ │ │ ├── closing_loc: (33,0)-(33,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── then_keyword_loc: ∅
├── statements:
diff --git a/test/prism/snapshots/unparser/corpus/literal/lambda.txt b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
index a8fb22d80f..130623ef10 100644
--- a/test/prism/snapshots/unparser/corpus/literal/lambda.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
@@ -17,7 +17,8 @@
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,7)-(1,8) = "{"
- │ │ └── closing_loc: (2,0)-(2,1) = "}"
+ │ │ ├── closing_loc: (2,0)-(2,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (3,0)-(5,1))
│ ├── receiver: ∅
@@ -55,7 +56,8 @@
│ │ │ ├── name: :a
│ │ │ └── depth: 0
│ │ ├── opening_loc: (3,7)-(3,8) = "{"
- │ │ └── closing_loc: (5,0)-(5,1) = "}"
+ │ │ ├── closing_loc: (5,0)-(5,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ LambdaNode (location: (6,0)-(7,1))
│ ├── locals: []
@@ -68,7 +70,8 @@
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: (6,2)-(6,3) = "("
│ │ └── closing_loc: (6,3)-(6,4) = ")"
- │ └── body: ∅
+ │ ├── body: ∅
+ │ └── numbered_parameters: 0
├── @ LambdaNode (location: (8,0)-(9,1))
│ ├── locals: [:a]
│ ├── operator_loc: (8,0)-(8,2) = "->"
@@ -90,7 +93,8 @@
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: (8,2)-(8,3) = "("
│ │ └── closing_loc: (8,4)-(8,5) = ")"
- │ └── body: ∅
+ │ ├── body: ∅
+ │ └── numbered_parameters: 0
├── @ LambdaNode (location: (10,0)-(11,1))
│ ├── locals: [:a, :b]
│ ├── operator_loc: (10,0)-(10,2) = "->"
@@ -114,7 +118,8 @@
│ │ ├── locals: (length: 0)
│ │ ├── opening_loc: (10,2)-(10,3) = "("
│ │ └── closing_loc: (10,7)-(10,8) = ")"
- │ └── body: ∅
+ │ ├── body: ∅
+ │ └── numbered_parameters: 0
└── @ LambdaNode (location: (12,0)-(13,1))
├── locals: [:a, :b, :c]
├── operator_loc: (12,0)-(12,2) = "->"
@@ -140,4 +145,5 @@
│ │ └── name: :c
│ ├── opening_loc: (12,2)-(12,3) = "("
│ └── closing_loc: (12,10)-(12,11) = ")"
- └── body: ∅
+ ├── body: ∅
+ └── numbered_parameters: 0
diff --git a/test/prism/snapshots/unparser/corpus/literal/literal.txt b/test/prism/snapshots/unparser/corpus/literal/literal.txt
index aa36dd7e35..b407f23d56 100644
--- a/test/prism/snapshots/unparser/corpus/literal/literal.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/literal.txt
@@ -1081,7 +1081,8 @@
│ │ │ │ └── unescaped: "\na"
│ │ │ └── closing_loc: (85,6)-(85,7) = "\""
│ │ ├── opening_loc: (83,4)-(83,5) = "{"
- │ │ └── closing_loc: (86,0)-(86,1) = "}"
+ │ │ ├── closing_loc: (86,0)-(86,1) = "}"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ SymbolNode (location: (87,0)-(88,2))
│ ├── opening_loc: (87,0)-(87,2) = ":\""
diff --git a/test/prism/snapshots/unparser/corpus/literal/send.txt b/test/prism/snapshots/unparser/corpus/literal/send.txt
index 469b3dae4b..bdeacaceea 100644
--- a/test/prism/snapshots/unparser/corpus/literal/send.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/send.txt
@@ -373,7 +373,8 @@
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (33,5)-(33,6) = "{"
- │ │ │ └── closing_loc: (34,0)-(34,1) = "}"
+ │ │ │ ├── closing_loc: (34,0)-(34,1) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── call_operator_loc: (34,1)-(34,2) = "."
│ ├── name: :bar
diff --git a/test/prism/snapshots/unparser/corpus/literal/since/27.txt b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
index 8e79acb870..8618dc6e6d 100644
--- a/test/prism/snapshots/unparser/corpus/literal/since/27.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/since/27.txt
@@ -9,28 +9,29 @@
│ ├── opening_loc: (1,3)-(1,4) = "{"
│ ├── closing_loc: (3,0)-(3,1) = "}"
│ ├── parameters: ∅
- │ └── body:
- │ @ StatementsNode (location: (2,2)-(2,9))
- │ └── body: (length: 1)
- │ └── @ CallNode (location: (2,2)-(2,9))
- │ ├── receiver:
- │ │ @ LocalVariableReadNode (location: (2,2)-(2,4))
- │ │ ├── name: :_1
- │ │ └── depth: 0
- │ ├── call_operator_loc: ∅
- │ ├── name: :+
- │ ├── message_loc: (2,5)-(2,6) = "+"
- │ ├── opening_loc: ∅
- │ ├── arguments:
- │ │ @ ArgumentsNode (location: (2,7)-(2,9))
- │ │ ├── arguments: (length: 1)
- │ │ │ └── @ LocalVariableReadNode (location: (2,7)-(2,9))
- │ │ │ ├── name: :_2
- │ │ │ └── depth: 0
- │ │ └── flags: ∅
- │ ├── closing_loc: ∅
- │ ├── block: ∅
- │ └── flags: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (2,2)-(2,9))
+ │ │ ├── receiver:
+ │ │ │ @ LocalVariableReadNode (location: (2,2)-(2,4))
+ │ │ │ ├── name: :_1
+ │ │ │ └── depth: 0
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :+
+ │ │ ├── message_loc: (2,5)-(2,6) = "+"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments:
+ │ │ │ @ ArgumentsNode (location: (2,7)-(2,9))
+ │ │ │ ├── arguments: (length: 1)
+ │ │ │ │ └── @ LocalVariableReadNode (location: (2,7)-(2,9))
+ │ │ │ │ ├── name: :_2
+ │ │ │ │ └── depth: 0
+ │ │ │ └── flags: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block: ∅
+ │ │ └── flags: ∅
+ │ └── numbered_parameters: 2
└── @ ParenthesesNode (location: (4,0)-(4,5))
├── body:
│ @ StatementsNode (location: (4,1)-(4,4))
diff --git a/test/prism/snapshots/unparser/corpus/literal/super.txt b/test/prism/snapshots/unparser/corpus/literal/super.txt
index 8175d3504a..daef89f848 100644
--- a/test/prism/snapshots/unparser/corpus/literal/super.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/super.txt
@@ -142,7 +142,8 @@
│ │ │ │ │ ├── block: ∅
│ │ │ │ │ └── flags: variable_call
│ │ │ │ ├── opening_loc: (7,8)-(7,9) = "{"
- │ │ │ │ └── closing_loc: (9,0)-(9,1) = "}"
+ │ │ │ │ ├── closing_loc: (9,0)-(9,1) = "}"
+ │ │ │ │ └── numbered_parameters: 0
│ │ │ └── flags: ∅
│ │ └── flags: ∅
│ ├── rparen_loc: (9,1)-(9,2) = ")"
@@ -166,7 +167,8 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── opening_loc: (10,6)-(10,7) = "{"
- │ └── closing_loc: (12,0)-(12,1) = "}"
+ │ ├── closing_loc: (12,0)-(12,1) = "}"
+ │ └── numbered_parameters: 0
├── @ SuperNode (location: (13,0)-(15,1))
│ ├── keyword_loc: (13,0)-(13,5) = "super"
│ ├── lparen_loc: (13,5)-(13,6) = "("
@@ -203,7 +205,8 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── opening_loc: (13,9)-(13,10) = "{"
- │ └── closing_loc: (15,0)-(15,1) = "}"
+ │ ├── closing_loc: (15,0)-(15,1) = "}"
+ │ └── numbered_parameters: 0
├── @ SuperNode (location: (16,0)-(18,1))
│ ├── keyword_loc: (16,0)-(16,5) = "super"
│ ├── lparen_loc: (16,5)-(16,6) = "("
@@ -227,7 +230,8 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── opening_loc: (16,8)-(16,9) = "{"
- │ └── closing_loc: (18,0)-(18,1) = "}"
+ │ ├── closing_loc: (18,0)-(18,1) = "}"
+ │ └── numbered_parameters: 0
└── @ SuperNode (location: (19,0)-(21,1))
├── keyword_loc: (19,0)-(19,5) = "super"
├── lparen_loc: (19,5)-(19,6) = "("
@@ -274,4 +278,5 @@
│ ├── block: ∅
│ └── flags: variable_call
├── opening_loc: (19,12)-(19,13) = "{"
- └── closing_loc: (21,0)-(21,1) = "}"
+ ├── closing_loc: (21,0)-(21,1) = "}"
+ └── numbered_parameters: 0
diff --git a/test/prism/snapshots/unparser/corpus/literal/while.txt b/test/prism/snapshots/unparser/corpus/literal/while.txt
index 7bcf111cef..5771e5da39 100644
--- a/test/prism/snapshots/unparser/corpus/literal/while.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/while.txt
@@ -70,7 +70,8 @@
│ │ │ │ │ └── operator_loc: (4,10)-(4,11) = "="
│ │ │ │ └── flags: ∅
│ │ │ ├── opening_loc: (2,6)-(2,7) = "{"
- │ │ │ └── closing_loc: (6,2)-(6,3) = "}"
+ │ │ │ ├── closing_loc: (6,2)-(6,3) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── end_keyword_loc: (7,0)-(7,3) = "end"
│ └── name: :A
@@ -334,7 +335,8 @@
│ │ │ │ │ └── operator_loc: (30,10)-(30,11) = "="
│ │ │ │ └── flags: ∅
│ │ │ ├── opening_loc: (28,7)-(28,8) = "{"
- │ │ │ └── closing_loc: (32,2)-(32,3) = "}"
+ │ │ │ ├── closing_loc: (32,2)-(32,3) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── end_keyword_loc: (33,0)-(33,3) = "end"
│ └── name: :A
@@ -405,7 +407,8 @@
│ │ │ │ │ └── operator_loc: (38,10)-(38,11) = "="
│ │ │ │ └── flags: ∅
│ │ │ ├── opening_loc: (36,7)-(36,8) = "{"
- │ │ │ └── closing_loc: (40,2)-(40,3) = "}"
+ │ │ │ ├── closing_loc: (40,2)-(40,3) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── end_keyword_loc: (41,0)-(41,3) = "end"
│ └── name: :A
@@ -629,7 +632,8 @@
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (61,11)-(61,12) = "{"
- │ │ │ │ └── closing_loc: (62,0)-(62,1) = "}"
+ │ │ │ │ ├── closing_loc: (62,0)-(62,1) = "}"
+ │ │ │ │ └── numbered_parameters: 0
│ │ │ └── flags: ∅
│ │ ├── opening_loc: (61,6)-(61,7) = "("
│ │ └── closing_loc: (62,1)-(62,2) = ")"
@@ -682,7 +686,8 @@
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (70,11)-(70,12) = "{"
- │ │ │ └── closing_loc: (71,0)-(71,1) = "}"
+ │ │ │ ├── closing_loc: (71,0)-(71,1) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── opening_loc: (70,6)-(70,7) = "("
│ └── closing_loc: (71,1)-(71,2) = ")"
diff --git a/test/prism/snapshots/unparser/corpus/semantic/block.txt b/test/prism/snapshots/unparser/corpus/semantic/block.txt
index f3d5440a59..c3ac1f85c6 100644
--- a/test/prism/snapshots/unparser/corpus/semantic/block.txt
+++ b/test/prism/snapshots/unparser/corpus/semantic/block.txt
@@ -17,7 +17,8 @@
│ │ ├── parameters: ∅
│ │ ├── body: ∅
│ │ ├── opening_loc: (1,4)-(1,6) = "do"
- │ │ └── closing_loc: (2,0)-(2,3) = "end"
+ │ │ ├── closing_loc: (2,0)-(2,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (4,0)-(6,3))
│ ├── receiver: ∅
@@ -47,7 +48,8 @@
│ │ │ ├── ensure_clause: ∅
│ │ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
│ │ ├── opening_loc: (4,4)-(4,6) = "do"
- │ │ └── closing_loc: (6,0)-(6,3) = "end"
+ │ │ ├── closing_loc: (6,0)-(6,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (8,0)-(11,3))
│ ├── receiver: ∅
@@ -72,7 +74,8 @@
│ │ │ │ @ NilNode (location: (9,13)-(9,16))
│ │ │ └── @ NilNode (location: (10,2)-(10,5))
│ │ ├── opening_loc: (8,4)-(8,6) = "do"
- │ │ └── closing_loc: (11,0)-(11,3) = "end"
+ │ │ ├── closing_loc: (11,0)-(11,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (13,0)-(14,3))
│ ├── receiver: ∅
@@ -103,7 +106,8 @@
│ │ │ └── closing_loc: (13,9)-(13,10) = "|"
│ │ ├── body: ∅
│ │ ├── opening_loc: (13,4)-(13,6) = "do"
- │ │ └── closing_loc: (14,0)-(14,3) = "end"
+ │ │ ├── closing_loc: (14,0)-(14,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
├── @ CallNode (location: (16,0)-(20,3))
│ ├── receiver: ∅
@@ -148,7 +152,8 @@
│ │ │ ├── name: :a
│ │ │ └── depth: 0
│ │ ├── opening_loc: (16,12)-(16,14) = "do"
- │ │ └── closing_loc: (20,0)-(20,3) = "end"
+ │ │ ├── closing_loc: (20,0)-(20,3) = "end"
+ │ │ └── numbered_parameters: 0
│ └── flags: ∅
└── @ CallNode (location: (22,0)-(26,3))
├── receiver: ∅
@@ -185,5 +190,6 @@
│ │ ├── block: ∅
│ │ └── flags: variable_call
│ ├── opening_loc: (22,12)-(22,14) = "do"
- │ └── closing_loc: (26,0)-(26,3) = "end"
+ │ ├── closing_loc: (26,0)-(26,3) = "end"
+ │ └── numbered_parameters: 0
└── flags: ∅
diff --git a/test/prism/snapshots/unparser/corpus/semantic/while.txt b/test/prism/snapshots/unparser/corpus/semantic/while.txt
index 6339a0208a..6d79ccfeda 100644
--- a/test/prism/snapshots/unparser/corpus/semantic/while.txt
+++ b/test/prism/snapshots/unparser/corpus/semantic/while.txt
@@ -21,7 +21,8 @@
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (1,11)-(1,12) = "{"
- │ │ │ └── closing_loc: (1,12)-(1,13) = "}"
+ │ │ │ ├── closing_loc: (1,12)-(1,13) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── statements:
│ │ @ StatementsNode (location: (1,0)-(1,1))
@@ -55,7 +56,8 @@
│ │ │ ├── parameters: ∅
│ │ │ ├── body: ∅
│ │ │ ├── opening_loc: (3,9)-(3,10) = "{"
- │ │ │ └── closing_loc: (3,10)-(3,11) = "}"
+ │ │ │ ├── closing_loc: (3,10)-(3,11) = "}"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── statements:
│ │ @ StatementsNode (location: (4,2)-(4,3))
@@ -129,7 +131,8 @@
│ │ │ │ ├── parameters: ∅
│ │ │ │ ├── body: ∅
│ │ │ │ ├── opening_loc: (9,15)-(9,16) = "{"
- │ │ │ │ └── closing_loc: (9,17)-(9,18) = "}"
+ │ │ │ │ ├── closing_loc: (9,17)-(9,18) = "}"
+ │ │ │ │ └── numbered_parameters: 0
│ │ │ └── flags: ∅
│ │ └── operator_loc: (9,10)-(9,12) = "&&"
│ ├── statements:
@@ -212,7 +215,8 @@
│ │ │ │ ├── block: ∅
│ │ │ │ └── flags: variable_call
│ │ │ ├── opening_loc: (15,18)-(15,20) = "do"
- │ │ │ └── closing_loc: (18,0)-(18,3) = "end"
+ │ │ │ ├── closing_loc: (18,0)-(18,3) = "end"
+ │ │ │ └── numbered_parameters: 0
│ │ └── flags: ∅
│ ├── statements:
│ │ @ StatementsNode (location: (15,0)-(15,1))