summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/unparser/corpus/literal/for.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/snapshots/unparser/corpus/literal/for.txt')
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/for.txt171
1 files changed, 171 insertions, 0 deletions
diff --git a/test/prism/snapshots/unparser/corpus/literal/for.txt b/test/prism/snapshots/unparser/corpus/literal/for.txt
new file mode 100644
index 0000000000..660c6b73f3
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/for.txt
@@ -0,0 +1,171 @@
+@ ProgramNode (location: (1,0)-(12,3))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(12,3))
+ └── body: (length: 4)
+ ├── @ CallNode (location: (1,0)-(3,4))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (1,0)-(1,3) = "bar"
+ │ ├── opening_loc: (1,3)-(1,4) = "("
+ │ ├── arguments:
+ │ │ @ ArgumentsNode (location: (1,4)-(3,3))
+ │ │ ├── flags: ∅
+ │ │ └── arguments: (length: 1)
+ │ │ └── @ ForNode (location: (1,4)-(3,3))
+ │ │ ├── index:
+ │ │ │ @ LocalVariableTargetNode (location: (1,8)-(1,9))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── collection:
+ │ │ │ @ CallNode (location: (1,13)-(1,16))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :bar
+ │ │ │ ├── message_loc: (1,13)-(1,16) = "bar"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── statements:
+ │ │ │ @ StatementsNode (location: (2,2)-(2,5))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,2)-(2,5))
+ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ ├── receiver: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :baz
+ │ │ │ ├── message_loc: (2,2)-(2,5) = "baz"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── for_keyword_loc: (1,4)-(1,7) = "for"
+ │ │ ├── in_keyword_loc: (1,10)-(1,12) = "in"
+ │ │ ├── do_keyword_loc: (1,17)-(1,19) = "do"
+ │ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ │ ├── closing_loc: (3,3)-(3,4) = ")"
+ │ └── block: ∅
+ ├── @ ForNode (location: (4,0)-(6,3))
+ │ ├── index:
+ │ │ @ LocalVariableTargetNode (location: (4,4)-(4,5))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── collection:
+ │ │ @ CallNode (location: (4,9)-(4,12))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (4,9)-(4,12) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (5,2)-(5,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (5,2)-(5,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (5,2)-(5,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── for_keyword_loc: (4,0)-(4,3) = "for"
+ │ ├── in_keyword_loc: (4,6)-(4,8) = "in"
+ │ ├── do_keyword_loc: (4,13)-(4,15) = "do"
+ │ └── end_keyword_loc: (6,0)-(6,3) = "end"
+ ├── @ ForNode (location: (7,0)-(9,3))
+ │ ├── index:
+ │ │ @ MultiTargetNode (location: (7,4)-(7,11))
+ │ │ ├── lefts: (length: 1)
+ │ │ │ └── @ LocalVariableTargetNode (location: (7,5)-(7,6))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ ├── rest:
+ │ │ │ @ SplatNode (location: (7,8)-(7,10))
+ │ │ │ ├── operator_loc: (7,8)-(7,9) = "*"
+ │ │ │ └── expression:
+ │ │ │ @ LocalVariableTargetNode (location: (7,9)-(7,10))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: (7,4)-(7,5) = "("
+ │ │ └── rparen_loc: (7,10)-(7,11) = ")"
+ │ ├── collection:
+ │ │ @ CallNode (location: (7,15)-(7,18))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :bar
+ │ │ ├── message_loc: (7,15)-(7,18) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (8,2)-(8,5))
+ │ │ └── body: (length: 1)
+ │ │ └── @ CallNode (location: (8,2)-(8,5))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :baz
+ │ │ ├── message_loc: (8,2)-(8,5) = "baz"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── for_keyword_loc: (7,0)-(7,3) = "for"
+ │ ├── in_keyword_loc: (7,12)-(7,14) = "in"
+ │ ├── do_keyword_loc: (7,19)-(7,21) = "do"
+ │ └── end_keyword_loc: (9,0)-(9,3) = "end"
+ └── @ ForNode (location: (10,0)-(12,3))
+ ├── index:
+ │ @ MultiTargetNode (location: (10,4)-(10,10))
+ │ ├── lefts: (length: 2)
+ │ │ ├── @ LocalVariableTargetNode (location: (10,5)-(10,6))
+ │ │ │ ├── name: :a
+ │ │ │ └── depth: 0
+ │ │ └── @ LocalVariableTargetNode (location: (10,8)-(10,9))
+ │ │ ├── name: :b
+ │ │ └── depth: 0
+ │ ├── rest: ∅
+ │ ├── rights: (length: 0)
+ │ ├── lparen_loc: (10,4)-(10,5) = "("
+ │ └── rparen_loc: (10,9)-(10,10) = ")"
+ ├── collection:
+ │ @ CallNode (location: (10,14)-(10,17))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :bar
+ │ ├── message_loc: (10,14)-(10,17) = "bar"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── statements:
+ │ @ StatementsNode (location: (11,2)-(11,5))
+ │ └── body: (length: 1)
+ │ └── @ CallNode (location: (11,2)-(11,5))
+ │ ├── flags: variable_call, ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :baz
+ │ ├── message_loc: (11,2)-(11,5) = "baz"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block: ∅
+ ├── for_keyword_loc: (10,0)-(10,3) = "for"
+ ├── in_keyword_loc: (10,11)-(10,13) = "in"
+ ├── do_keyword_loc: (10,18)-(10,20) = "do"
+ └── end_keyword_loc: (12,0)-(12,3) = "end"