diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-12-06 15:32:53 -0500 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-12-06 20:50:02 +0000 |
commit | fe6ee5e92148755b75ffd00ab29611b59a416d5a (patch) | |
tree | 9283cde10b67c8daec7c56511f58ed9133569377 /test/prism/snapshots/seattlerb | |
parent | cbb941f58a236d95d9e95c3f6dbd4510c04351f0 (diff) | |
download | ruby-fe6ee5e92148755b75ffd00ab29611b59a416d5a.tar.gz |
[ruby/prism] Move flag position consistently to front
https://github.com/ruby/prism/commit/6e69a81737
Diffstat (limited to 'test/prism/snapshots/seattlerb')
351 files changed, 6458 insertions, 6458 deletions
diff --git a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt index 56e892bc89..5b8731c191 100644 --- a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt +++ b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt @@ -4,11 +4,12 @@ @ StatementsNode (location: (1,0)-(92,1)) └── body: (length: 16) ├── @ ArrayNode (location: (1,0)-(4,1)) + │ ├── flags: ∅ │ ├── elements: (length: 0) │ ├── opening_loc: (1,0)-(1,3) = "%I[" - │ ├── closing_loc: (4,0)-(4,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (4,0)-(4,1) = "]" ├── @ ArrayNode (location: (6,0)-(9,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ SymbolNode (location: (7,0)-(7,5)) │ │ │ ├── opening_loc: ∅ @@ -21,14 +22,14 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "line3" │ ├── opening_loc: (6,0)-(6,3) = "%I[" - │ ├── closing_loc: (9,0)-(9,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (9,0)-(9,1) = "]" ├── @ ArrayNode (location: (11,0)-(14,1)) + │ ├── flags: ∅ │ ├── elements: (length: 0) │ ├── opening_loc: (11,0)-(11,3) = "%W[" - │ ├── closing_loc: (14,0)-(14,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (14,0)-(14,1) = "]" ├── @ ArrayNode (location: (16,0)-(19,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ StringNode (location: (17,0)-(17,5)) │ │ │ ├── flags: ∅ @@ -43,14 +44,14 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "line3" │ ├── opening_loc: (16,0)-(16,3) = "%W[" - │ ├── closing_loc: (19,0)-(19,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (19,0)-(19,1) = "]" ├── @ ArrayNode (location: (21,0)-(24,1)) + │ ├── flags: ∅ │ ├── elements: (length: 0) │ ├── opening_loc: (21,0)-(21,3) = "%i[" - │ ├── closing_loc: (24,0)-(24,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (24,0)-(24,1) = "]" ├── @ ArrayNode (location: (26,0)-(29,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ SymbolNode (location: (27,0)-(27,5)) │ │ │ ├── opening_loc: ∅ @@ -63,20 +64,20 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "line3" │ ├── opening_loc: (26,0)-(26,3) = "%i[" - │ ├── closing_loc: (29,0)-(29,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (29,0)-(29,1) = "]" ├── @ RegularExpressionNode (location: (31,0)-(34,1)) + │ ├── flags: ∅ │ ├── opening_loc: (31,0)-(31,3) = "%r[" │ ├── content_loc: (31,3)-(34,0) = "\n\n\n" │ ├── closing_loc: (34,0)-(34,1) = "]" - │ ├── unescaped: "\n\n\n" - │ └── flags: ∅ + │ └── unescaped: "\n\n\n" ├── @ ArrayNode (location: (36,0)-(39,1)) + │ ├── flags: ∅ │ ├── elements: (length: 0) │ ├── opening_loc: (36,0)-(36,3) = "%w[" - │ ├── closing_loc: (39,0)-(39,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (39,0)-(39,1) = "]" ├── @ ArrayNode (location: (41,0)-(44,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ StringNode (location: (42,0)-(42,5)) │ │ │ ├── flags: ∅ @@ -91,9 +92,9 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "line3" │ ├── opening_loc: (41,0)-(41,3) = "%w[" - │ ├── closing_loc: (44,0)-(44,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (44,0)-(44,1) = "]" ├── @ ArrayNode (location: (46,0)-(49,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ SymbolNode (location: (47,0)-(47,6)) │ │ │ ├── opening_loc: (47,0)-(47,1) = ":" @@ -106,8 +107,7 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "line3" │ ├── opening_loc: (46,0)-(46,1) = "[" - │ ├── closing_loc: (49,0)-(49,1) = "]" - │ └── flags: ∅ + │ └── closing_loc: (49,0)-(49,1) = "]" ├── @ ClassNode (location: (51,0)-(56,3)) │ ├── locals: [] │ ├── class_keyword_loc: (51,0)-(51,5) = "class" @@ -141,6 +141,7 @@ │ │ │ @ StatementsNode (location: (54,4)-(54,9)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (54,4)-(54,9)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: │ │ │ │ @ LocalVariableReadNode (location: (54,4)-(54,5)) │ │ │ │ ├── name: :a @@ -151,14 +152,13 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (54,8)-(54,9)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ LocalVariableReadNode (location: (54,8)-(54,9)) - │ │ │ │ │ ├── name: :b - │ │ │ │ │ └── depth: 0 - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ LocalVariableReadNode (location: (54,8)-(54,9)) + │ │ │ │ ├── name: :b + │ │ │ │ └── depth: 0 │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── locals: [:a, :b] │ │ ├── locals_body_index: 2 │ │ ├── def_keyword_loc: (52,2)-(52,5) = "def" @@ -234,6 +234,7 @@ │ │ │ @ StatementsNode (location: (69,4)-(69,9)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (69,4)-(69,9)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: │ │ │ │ @ LocalVariableReadNode (location: (69,4)-(69,5)) │ │ │ │ ├── name: :a @@ -244,14 +245,13 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (69,8)-(69,9)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ LocalVariableReadNode (location: (69,8)-(69,9)) - │ │ │ │ │ ├── name: :b - │ │ │ │ │ └── depth: 0 - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ LocalVariableReadNode (location: (69,8)-(69,9)) + │ │ │ │ ├── name: :b + │ │ │ │ └── depth: 0 │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── locals: [:a, :b] │ │ ├── locals_body_index: 2 │ │ ├── def_keyword_loc: (67,2)-(67,5) = "def" @@ -276,6 +276,7 @@ │ │ ├── name_loc: (75,2)-(75,3) = "X" │ │ ├── value: │ │ │ @ ArrayNode (location: (75,6)-(78,3)) + │ │ │ ├── flags: ∅ │ │ │ ├── elements: (length: 2) │ │ │ │ ├── @ SymbolNode (location: (76,4)-(76,10)) │ │ │ │ │ ├── opening_loc: (76,4)-(76,5) = ":" @@ -288,8 +289,7 @@ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "line4" │ │ │ ├── opening_loc: (75,6)-(75,7) = "[" - │ │ │ ├── closing_loc: (78,2)-(78,3) = "]" - │ │ │ └── flags: ∅ + │ │ │ └── closing_loc: (78,2)-(78,3) = "]" │ │ └── operator_loc: (75,4)-(75,5) = "=" │ ├── end_keyword_loc: (79,0)-(79,3) = "end" │ └── name: :X @@ -323,6 +323,7 @@ │ ├── end_keyword_loc: (86,0)-(86,3) = "end" │ └── name: :X └── @ CallNode (location: (89,0)-(92,1)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -330,18 +331,17 @@ ├── opening_loc: (89,1)-(89,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (90,0)-(91,6)) - │ ├── arguments: (length: 2) - │ │ ├── @ SymbolNode (location: (90,0)-(90,6)) - │ │ │ ├── opening_loc: (90,0)-(90,1) = ":" - │ │ │ ├── value_loc: (90,1)-(90,6) = "line2" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "line2" - │ │ └── @ SymbolNode (location: (91,0)-(91,6)) - │ │ ├── opening_loc: (91,0)-(91,1) = ":" - │ │ ├── value_loc: (91,1)-(91,6) = "line3" - │ │ ├── closing_loc: ∅ - │ │ └── unescaped: "line3" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ SymbolNode (location: (90,0)-(90,6)) + │ │ ├── opening_loc: (90,0)-(90,1) = ":" + │ │ ├── value_loc: (90,1)-(90,6) = "line2" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "line2" + │ └── @ SymbolNode (location: (91,0)-(91,6)) + │ ├── opening_loc: (91,0)-(91,1) = ":" + │ ├── value_loc: (91,1)-(91,6) = "line3" + │ ├── closing_loc: ∅ + │ └── unescaped: "line3" ├── closing_loc: (92,0)-(92,1) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/and_multi.txt b/test/prism/snapshots/seattlerb/and_multi.txt index ab73ffd076..b60b131fd2 100644 --- a/test/prism/snapshots/seattlerb/and_multi.txt +++ b/test/prism/snapshots/seattlerb/and_multi.txt @@ -10,6 +10,7 @@ │ │ @ TrueNode (location: (1,0)-(1,4)) │ ├── right: │ │ @ CallNode (location: (2,0)-(2,9)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ FalseNode (location: (2,4)-(2,9)) │ │ ├── call_operator_loc: ∅ @@ -18,8 +19,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ └── operator_loc: (1,5)-(1,8) = "and" ├── right: │ @ TrueNode (location: (3,0)-(3,4)) diff --git a/test/prism/snapshots/seattlerb/aref_args_assocs.txt b/test/prism/snapshots/seattlerb/aref_args_assocs.txt index 79381cd827..b7f0446980 100644 --- a/test/prism/snapshots/seattlerb/aref_args_assocs.txt +++ b/test/prism/snapshots/seattlerb/aref_args_assocs.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,8)) + ├── flags: ∅ ├── elements: (length: 1) │ └── @ KeywordHashNode (location: (1,1)-(1,7)) │ └── elements: (length: 1) @@ -16,5 +17,4 @@ │ │ └── flags: decimal │ └── operator_loc: (1,3)-(1,5) = "=>" ├── opening_loc: (1,0)-(1,1) = "[" - ├── closing_loc: (1,7)-(1,8) = "]" - └── flags: ∅ + └── closing_loc: (1,7)-(1,8) = "]" diff --git a/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt b/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt index c2dd80997f..8573d1d7b7 100644 --- a/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt +++ b/test/prism/snapshots/seattlerb/aref_args_lit_assocs.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── elements: (length: 2) │ ├── @ IntegerNode (location: (1,1)-(1,2)) │ │ └── flags: decimal @@ -18,5 +19,4 @@ │ │ └── flags: decimal │ └── operator_loc: (1,6)-(1,8) = "=>" ├── opening_loc: (1,0)-(1,1) = "[" - ├── closing_loc: (1,10)-(1,11) = "]" - └── flags: ∅ + └── closing_loc: (1,10)-(1,11) = "]" diff --git a/test/prism/snapshots/seattlerb/array_line_breaks.txt b/test/prism/snapshots/seattlerb/array_line_breaks.txt index 9008feb483..a08ee03052 100644 --- a/test/prism/snapshots/seattlerb/array_line_breaks.txt +++ b/test/prism/snapshots/seattlerb/array_line_breaks.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,1)) └── body: (length: 2) ├── @ ArrayNode (location: (1,0)-(3,4)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ StringNode (location: (2,0)-(2,3)) │ │ │ ├── flags: ∅ @@ -18,7 +19,6 @@ │ │ ├── closing_loc: (3,2)-(3,3) = "'" │ │ └── unescaped: "b" │ ├── opening_loc: (1,0)-(1,1) = "[" - │ ├── closing_loc: (3,3)-(3,4) = "]" - │ └── flags: ∅ + │ └── closing_loc: (3,3)-(3,4) = "]" └── @ IntegerNode (location: (4,0)-(4,1)) └── flags: decimal diff --git a/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt b/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt index f67eb1fc16..d46a181fc7 100644 --- a/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt +++ b/test/prism/snapshots/seattlerb/array_lits_trailing_calls.txt @@ -4,32 +4,32 @@ @ StatementsNode (location: (1,0)-(3,4)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,6)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ ArrayNode (location: (1,0)-(1,4)) + │ │ ├── flags: ∅ │ │ ├── elements: (length: 0) │ │ ├── opening_loc: (1,0)-(1,3) = "%w[" - │ │ ├── closing_loc: (1,3)-(1,4) = "]" - │ │ └── flags: ∅ + │ │ └── closing_loc: (1,3)-(1,4) = "]" │ ├── call_operator_loc: (1,4)-(1,5) = "." │ ├── name: :b │ ├── message_loc: (1,5)-(1,6) = "b" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (3,0)-(3,4)) + ├── flags: ∅ ├── receiver: │ @ ArrayNode (location: (3,0)-(3,2)) + │ ├── flags: ∅ │ ├── elements: (length: 0) │ ├── opening_loc: (3,0)-(3,1) = "[" - │ ├── closing_loc: (3,1)-(3,2) = "]" - │ └── flags: ∅ + │ └── closing_loc: (3,1)-(3,2) = "]" ├── call_operator_loc: (3,2)-(3,3) = "." ├── name: :b ├── message_loc: (3,3)-(3,4) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/assoc__bare.txt b/test/prism/snapshots/seattlerb/assoc__bare.txt index b5b3bc5f25..a6c77ca3bf 100644 --- a/test/prism/snapshots/seattlerb/assoc__bare.txt +++ b/test/prism/snapshots/seattlerb/assoc__bare.txt @@ -17,6 +17,7 @@ │ │ @ ImplicitNode (location: (1,2)-(1,4)) │ │ └── value: │ │ @ CallNode (location: (1,2)-(1,4)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :y @@ -24,7 +25,6 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ └── operator_loc: ∅ └── closing_loc: (1,5)-(1,6) = "}" diff --git a/test/prism/snapshots/seattlerb/assoc_label.txt b/test/prism/snapshots/seattlerb/assoc_label.txt index 6f79b2ca25..116635beb4 100644 --- a/test/prism/snapshots/seattlerb/assoc_label.txt +++ b/test/prism/snapshots/seattlerb/assoc_label.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,21 +12,20 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,2)-(1,5)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,2)-(1,5)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,2)-(1,4)) - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (1,2)-(1,3) = "b" - │ │ │ ├── closing_loc: (1,3)-(1,4) = ":" - │ │ │ └── unescaped: "b" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,4)-(1,5)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,2)-(1,5)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,2)-(1,5)) + │ ├── key: + │ │ @ SymbolNode (location: (1,2)-(1,4)) + │ │ ├── opening_loc: ∅ + │ │ ├── value_loc: (1,2)-(1,3) = "b" + │ │ ├── closing_loc: (1,3)-(1,4) = ":" + │ │ └── unescaped: "b" + │ ├── value: + │ │ @ IntegerNode (location: (1,4)-(1,5)) + │ │ └── flags: decimal + │ └── operator_loc: ∅ ├── closing_loc: (1,5)-(1,6) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt b/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt index 43e32673c2..c8478c368b 100644 --- a/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt +++ b/test/prism/snapshots/seattlerb/attr_asgn_colon_id.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,8)) + ├── flags: ∅ ├── receiver: │ @ ConstantReadNode (location: (1,0)-(1,1)) │ └── name: :A @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,7)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,7)-(1,8)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,7)-(1,8)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt b/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt index 89650b8d09..3b09e172e7 100644 --- a/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt +++ b/test/prism/snapshots/seattlerb/attrasgn_array_arg.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,27 +15,25 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :[]= ├── message_loc: (1,1)-(1,9) = "[[1, 2]]" ├── opening_loc: (1,1)-(1,2) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,13)) - │ ├── arguments: (length: 2) - │ │ ├── @ ArrayNode (location: (1,2)-(1,8)) - │ │ │ ├── elements: (length: 2) - │ │ │ │ ├── @ IntegerNode (location: (1,3)-(1,4)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ │ │ └── flags: decimal - │ │ │ ├── opening_loc: (1,2)-(1,3) = "[" - │ │ │ ├── closing_loc: (1,7)-(1,8) = "]" - │ │ │ └── flags: ∅ - │ │ └── @ IntegerNode (location: (1,12)-(1,13)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ ArrayNode (location: (1,2)-(1,8)) + │ │ ├── flags: ∅ + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (1,3)-(1,4)) + │ │ │ │ └── flags: decimal + │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ │ │ └── flags: decimal + │ │ ├── opening_loc: (1,2)-(1,3) = "[" + │ │ └── closing_loc: (1,7)-(1,8) = "]" + │ └── @ IntegerNode (location: (1,12)-(1,13)) + │ └── flags: decimal ├── closing_loc: (1,8)-(1,9) = "]" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt b/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt index 995f191a37..13615477df 100644 --- a/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt +++ b/test/prism/snapshots/seattlerb/attrasgn_array_lhs.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,42)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,42)) + ├── flags: ∅ ├── receiver: │ @ ArrayNode (location: (1,0)-(1,12)) + │ ├── flags: ∅ │ ├── elements: (length: 4) │ │ ├── @ IntegerNode (location: (1,1)-(1,2)) │ │ │ └── flags: decimal @@ -16,64 +18,62 @@ │ │ └── @ IntegerNode (location: (1,10)-(1,11)) │ │ └── flags: decimal │ ├── opening_loc: (1,0)-(1,1) = "[" - │ ├── closing_loc: (1,11)-(1,12) = "]" - │ └── flags: ∅ + │ └── closing_loc: (1,11)-(1,12) = "]" ├── call_operator_loc: ∅ ├── name: :[]= ├── message_loc: (1,12)-(1,24) = "[from .. to]" ├── opening_loc: (1,12)-(1,13) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,13)-(1,42)) - │ ├── arguments: (length: 2) - │ │ ├── @ RangeNode (location: (1,13)-(1,23)) - │ │ │ ├── left: - │ │ │ │ @ CallNode (location: (1,13)-(1,17)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :from - │ │ │ │ ├── message_loc: (1,13)-(1,17) = "from" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── right: - │ │ │ │ @ CallNode (location: (1,21)-(1,23)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :to - │ │ │ │ ├── message_loc: (1,21)-(1,23) = "to" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── operator_loc: (1,18)-(1,20) = ".." - │ │ │ └── flags: ∅ - │ │ └── @ ArrayNode (location: (1,27)-(1,42)) - │ │ ├── elements: (length: 3) - │ │ │ ├── @ StringNode (location: (1,28)-(1,31)) - │ │ │ │ ├── flags: ∅ - │ │ │ │ ├── opening_loc: (1,28)-(1,29) = "\"" - │ │ │ │ ├── content_loc: (1,29)-(1,30) = "a" - │ │ │ │ ├── closing_loc: (1,30)-(1,31) = "\"" - │ │ │ │ └── unescaped: "a" - │ │ │ ├── @ StringNode (location: (1,33)-(1,36)) - │ │ │ │ ├── flags: ∅ - │ │ │ │ ├── opening_loc: (1,33)-(1,34) = "\"" - │ │ │ │ ├── content_loc: (1,34)-(1,35) = "b" - │ │ │ │ ├── closing_loc: (1,35)-(1,36) = "\"" - │ │ │ │ └── unescaped: "b" - │ │ │ └── @ StringNode (location: (1,38)-(1,41)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,38)-(1,39) = "\"" - │ │ │ ├── content_loc: (1,39)-(1,40) = "c" - │ │ │ ├── closing_loc: (1,40)-(1,41) = "\"" - │ │ │ └── unescaped: "c" - │ │ ├── opening_loc: (1,27)-(1,28) = "[" - │ │ ├── closing_loc: (1,41)-(1,42) = "]" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ RangeNode (location: (1,13)-(1,23)) + │ │ ├── flags: ∅ + │ │ ├── left: + │ │ │ @ CallNode (location: (1,13)-(1,17)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :from + │ │ │ ├── message_loc: (1,13)-(1,17) = "from" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── right: + │ │ │ @ CallNode (location: (1,21)-(1,23)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :to + │ │ │ ├── message_loc: (1,21)-(1,23) = "to" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ └── operator_loc: (1,18)-(1,20) = ".." + │ └── @ ArrayNode (location: (1,27)-(1,42)) + │ ├── flags: ∅ + │ ├── elements: (length: 3) + │ │ ├── @ StringNode (location: (1,28)-(1,31)) + │ │ │ ├── flags: ∅ + │ │ │ ├── opening_loc: (1,28)-(1,29) = "\"" + │ │ │ ├── content_loc: (1,29)-(1,30) = "a" + │ │ │ ├── closing_loc: (1,30)-(1,31) = "\"" + │ │ │ └── unescaped: "a" + │ │ ├── @ StringNode (location: (1,33)-(1,36)) + │ │ │ ├── flags: ∅ + │ │ │ ├── opening_loc: (1,33)-(1,34) = "\"" + │ │ │ ├── content_loc: (1,34)-(1,35) = "b" + │ │ │ ├── closing_loc: (1,35)-(1,36) = "\"" + │ │ │ └── unescaped: "b" + │ │ └── @ StringNode (location: (1,38)-(1,41)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,38)-(1,39) = "\"" + │ │ ├── content_loc: (1,39)-(1,40) = "c" + │ │ ├── closing_loc: (1,40)-(1,41) = "\"" + │ │ └── unescaped: "c" + │ ├── opening_loc: (1,27)-(1,28) = "[" + │ └── closing_loc: (1,41)-(1,42) = "]" ├── closing_loc: (1,23)-(1,24) = "]" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt b/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt index 00777ecff4..4f22f3380a 100644 --- a/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt +++ b/test/prism/snapshots/seattlerb/attrasgn_primary_dot_constant.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,18 +15,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :B= ├── message_loc: (1,2)-(1,3) = "B" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,6)-(1,7)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt b/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt index dd6dac632d..abb7e680d7 100644 --- a/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt +++ b/test/prism/snapshots/seattlerb/backticks_interpolation_line.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,8)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -11,28 +12,27 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ InterpolatedXStringNode (location: (1,2)-(1,8)) - │ │ ├── opening_loc: (1,2)-(1,3) = "`" - │ │ ├── parts: (length: 1) - │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7)) - │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{" - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (1,5)-(1,6)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ CallNode (location: (1,5)-(1,6)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :y - │ │ │ │ ├── message_loc: (1,5)-(1,6) = "y" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ └── closing_loc: (1,6)-(1,7) = "}" - │ │ └── closing_loc: (1,7)-(1,8) = "`" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ InterpolatedXStringNode (location: (1,2)-(1,8)) + │ ├── opening_loc: (1,2)-(1,3) = "`" + │ ├── parts: (length: 1) + │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7)) + │ │ ├── opening_loc: (1,3)-(1,5) = "\#{" + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (1,5)-(1,6)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ CallNode (location: (1,5)-(1,6)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :y + │ │ │ ├── message_loc: (1,5)-(1,6) = "y" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ └── closing_loc: (1,6)-(1,7) = "}" + │ └── closing_loc: (1,7)-(1,8) = "`" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bang_eq.txt b/test/prism/snapshots/seattlerb/bang_eq.txt index cdf6b0407f..553362030e 100644 --- a/test/prism/snapshots/seattlerb/bang_eq.txt +++ b/test/prism/snapshots/seattlerb/bang_eq.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bdot2.txt b/test/prism/snapshots/seattlerb/bdot2.txt index d4563230d7..ad710a4212 100644 --- a/test/prism/snapshots/seattlerb/bdot2.txt +++ b/test/prism/snapshots/seattlerb/bdot2.txt @@ -4,16 +4,18 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 3) ├── @ RangeNode (location: (1,0)-(1,4)) + │ ├── flags: ∅ │ ├── left: ∅ │ ├── right: │ │ @ IntegerNode (location: (1,2)-(1,4)) │ │ └── flags: decimal - │ ├── operator_loc: (1,0)-(1,2) = ".." - │ └── flags: ∅ + │ └── operator_loc: (1,0)-(1,2) = ".." ├── @ RangeNode (location: (2,2)-(2,5)) + │ ├── flags: ∅ │ ├── left: ∅ │ ├── right: │ │ @ CallNode (location: (2,4)-(2,5)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -21,11 +23,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── operator_loc: (2,2)-(2,4) = ".." - │ └── flags: ∅ + │ │ └── block: ∅ + │ └── operator_loc: (2,2)-(2,4) = ".." └── @ CallNode (location: (3,2)-(3,3)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -33,5 +34,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bdot3.txt b/test/prism/snapshots/seattlerb/bdot3.txt index efbea91913..c9a1097099 100644 --- a/test/prism/snapshots/seattlerb/bdot3.txt +++ b/test/prism/snapshots/seattlerb/bdot3.txt @@ -4,16 +4,18 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 3) ├── @ RangeNode (location: (1,0)-(1,5)) + │ ├── flags: exclude_end │ ├── left: ∅ │ ├── right: │ │ @ IntegerNode (location: (1,3)-(1,5)) │ │ └── flags: decimal - │ ├── operator_loc: (1,0)-(1,3) = "..." - │ └── flags: exclude_end + │ └── operator_loc: (1,0)-(1,3) = "..." ├── @ RangeNode (location: (2,2)-(2,6)) + │ ├── flags: exclude_end │ ├── left: ∅ │ ├── right: │ │ @ CallNode (location: (2,5)-(2,6)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -21,11 +23,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── operator_loc: (2,2)-(2,5) = "..." - │ └── flags: exclude_end + │ │ └── block: ∅ + │ └── operator_loc: (2,2)-(2,5) = "..." └── @ CallNode (location: (3,2)-(3,3)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -33,5 +34,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt index 1837a569c8..d503dc7443 100644 --- a/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt +++ b/test/prism/snapshots/seattlerb/block_arg_kwsplat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,29 +12,28 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,11)) - │ ├── locals: [:b] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,9)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,8)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: - │ │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,8)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,7)-(1,8) = "b" - │ │ │ │ └── operator_loc: (1,5)-(1,7) = "**" - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,8)-(1,9) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,10)-(1,11) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,11)) + ├── locals: [:b] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,9)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,8)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: + │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,8)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,7)-(1,8) = "b" + │ │ │ └── operator_loc: (1,5)-(1,7) = "**" + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,8)-(1,9) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,10)-(1,11) = "}" diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt index 575790b9b6..fd0b46ed83 100644 --- a/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt +++ b/test/prism/snapshots/seattlerb/block_arg_opt_arg_block.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,21)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,21)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,21)) - │ ├── locals: [:b, :c, :d, :e] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,19)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,18)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c" - │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,10)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ └── name: :d - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,16)-(1,18)) - │ │ │ ├── name: :e - │ │ │ ├── name_loc: (1,17)-(1,18) = "e" - │ │ │ └── operator_loc: (1,16)-(1,17) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,18)-(1,19) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,20)-(1,21) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,21)) + ├── locals: [:b, :c, :d, :e] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,19)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,18)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,8)-(1,9) = "c" + │ │ │ ├── operator_loc: (1,9)-(1,10) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,10)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ └── name: :d + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,16)-(1,18)) + │ │ ├── name: :e + │ │ ├── name_loc: (1,17)-(1,18) = "e" + │ │ └── operator_loc: (1,16)-(1,17) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,18)-(1,19) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,20)-(1,21) = "}" diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt index 6167754363..736fec6ec1 100644 --- a/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt +++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,20)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,20)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,20)) - │ ├── locals: [:b, :c, :d] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,18)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,17)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,13)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c" - │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,12)-(1,13)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,15)-(1,17)) - │ │ │ │ ├── name: :d - │ │ │ │ ├── name_loc: (1,16)-(1,17) = "d" - │ │ │ │ └── operator_loc: (1,15)-(1,16) = "*" - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,17)-(1,18) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,19)-(1,20) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,20)) + ├── locals: [:b, :c, :d] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,18)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,17)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,13)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,8)-(1,9) = "c" + │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,12)-(1,13)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,15)-(1,17)) + │ │ │ ├── name: :d + │ │ │ ├── name_loc: (1,16)-(1,17) = "d" + │ │ │ └── operator_loc: (1,15)-(1,16) = "*" + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,17)-(1,18) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,19)-(1,20) = "}" diff --git a/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt index 33b7b53197..2b57a0c090 100644 --- a/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt +++ b/test/prism/snapshots/seattlerb/block_arg_opt_splat_arg_block_omfg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,25)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,25)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,44 +12,43 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,25)) - │ ├── locals: [:b, :c, :d, :e, :f] - │ ├── locals_body_index: 5 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,23)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,22)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c" - │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,10)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) - │ │ │ │ ├── name: :d - │ │ │ │ ├── name_loc: (1,14)-(1,15) = "d" - │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18)) - │ │ │ │ └── name: :e - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,20)-(1,22)) - │ │ │ ├── name: :f - │ │ │ ├── name_loc: (1,21)-(1,22) = "f" - │ │ │ └── operator_loc: (1,20)-(1,21) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,22)-(1,23) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,24)-(1,25) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,25)) + ├── locals: [:b, :c, :d, :e, :f] + ├── locals_body_index: 5 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,23)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,22)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,11)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,8)-(1,9) = "c" + │ │ │ ├── operator_loc: (1,9)-(1,10) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,10)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) + │ │ │ ├── name: :d + │ │ │ ├── name_loc: (1,14)-(1,15) = "d" + │ │ │ └── operator_loc: (1,13)-(1,14) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18)) + │ │ │ └── name: :e + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,20)-(1,22)) + │ │ ├── name: :f + │ │ ├── name_loc: (1,21)-(1,22) = "f" + │ │ └── operator_loc: (1,20)-(1,21) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,22)-(1,23) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,24)-(1,25) = "}" diff --git a/test/prism/snapshots/seattlerb/block_arg_optional.txt b/test/prism/snapshots/seattlerb/block_arg_optional.txt index 90fad77d2e..5e28906256 100644 --- a/test/prism/snapshots/seattlerb/block_arg_optional.txt +++ b/test/prism/snapshots/seattlerb/block_arg_optional.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,32 +12,31 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,13)) - │ ├── locals: [:b] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,11)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,10)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,10)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,10)-(1,11) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,12)-(1,13) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,13)) + ├── locals: [:b] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,11)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,10)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,5)-(1,6) = "b" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,10)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,10)-(1,11) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,12)-(1,13) = "}" diff --git a/test/prism/snapshots/seattlerb/block_arg_scope.txt b/test/prism/snapshots/seattlerb/block_arg_scope.txt index 1e356ea375..51de82e90a 100644 --- a/test/prism/snapshots/seattlerb/block_arg_scope.txt +++ b/test/prism/snapshots/seattlerb/block_arg_scope.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,12)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,12)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,29 +12,28 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,12)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,10)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,6)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 1) - │ │ │ └── @ BlockLocalVariableNode (location: (1,8)-(1,9)) - │ │ │ └── name: :c - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,9)-(1,10) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,11)-(1,12) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,12)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,10)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,6)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 1) + │ │ └── @ BlockLocalVariableNode (location: (1,8)-(1,9)) + │ │ └── name: :c + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,9)-(1,10) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,11)-(1,12) = "}" diff --git a/test/prism/snapshots/seattlerb/block_arg_scope2.txt b/test/prism/snapshots/seattlerb/block_arg_scope2.txt index 6afa7586de..3b4b198d1f 100644 --- a/test/prism/snapshots/seattlerb/block_arg_scope2.txt +++ b/test/prism/snapshots/seattlerb/block_arg_scope2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,14)) - │ ├── locals: [:b, :c, :d] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,3)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,4)-(1,5)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,4)-(1,5)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 2) - │ │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8)) - │ │ │ │ └── name: :c - │ │ │ └── @ BlockLocalVariableNode (location: (1,10)-(1,11)) - │ │ │ └── name: :d - │ │ ├── opening_loc: (1,3)-(1,4) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,13)-(1,14) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,14)) + ├── locals: [:b, :c, :d] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,3)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,4)-(1,5)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,4)-(1,5)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 2) + │ │ ├── @ BlockLocalVariableNode (location: (1,7)-(1,8)) + │ │ │ └── name: :c + │ │ └── @ BlockLocalVariableNode (location: (1,10)-(1,11)) + │ │ └── name: :d + │ ├── opening_loc: (1,3)-(1,4) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,13)-(1,14) = "}" diff --git a/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt index d51953269b..c8aae59285 100644 --- a/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt +++ b/test/prism/snapshots/seattlerb/block_arg_splat_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,33 +12,32 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,16)) - │ ├── locals: [:b, :c, :d] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,14)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,13)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,8)-(1,10)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,9)-(1,10) = "c" - │ │ │ │ └── operator_loc: (1,8)-(1,9) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) - │ │ │ │ └── name: :d - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,13)-(1,14) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,15)-(1,16) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,16)) + ├── locals: [:b, :c, :d] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,14)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,13)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 0) + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,8)-(1,10)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,9)-(1,10) = "c" + │ │ │ └── operator_loc: (1,8)-(1,9) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) + │ │ │ └── name: :d + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,13)-(1,14) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,15)-(1,16) = "}" diff --git a/test/prism/snapshots/seattlerb/block_args_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_kwargs.txt index dc2ce516e0..e4d311085d 100644 --- a/test/prism/snapshots/seattlerb/block_args_kwargs.txt +++ b/test/prism/snapshots/seattlerb/block_args_kwargs.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,23)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,23)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,34 +12,33 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,23)) - │ ├── locals: [:kwargs] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,14)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,13)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: - │ │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,13)) - │ │ │ │ ├── name: :kwargs - │ │ │ │ ├── name_loc: (1,7)-(1,13) = "kwargs" - │ │ │ │ └── operator_loc: (1,5)-(1,7) = "**" - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,13)-(1,14) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,15)-(1,21)) - │ │ └── body: (length: 1) - │ │ └── @ LocalVariableReadNode (location: (1,15)-(1,21)) - │ │ ├── name: :kwargs - │ │ └── depth: 0 - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,22)-(1,23) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,23)) + ├── locals: [:kwargs] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,14)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,13)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: + │ │ │ @ KeywordRestParameterNode (location: (1,5)-(1,13)) + │ │ │ ├── name: :kwargs + │ │ │ ├── name_loc: (1,7)-(1,13) = "kwargs" + │ │ │ └── operator_loc: (1,5)-(1,7) = "**" + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,13)-(1,14) = "|" + ├── body: + │ @ StatementsNode (location: (1,15)-(1,21)) + │ └── body: (length: 1) + │ └── @ LocalVariableReadNode (location: (1,15)-(1,21)) + │ ├── name: :kwargs + │ └── depth: 0 + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,22)-(1,23) = "}" diff --git a/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt b/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt index 6ad45cf5e6..70e4084395 100644 --- a/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt +++ b/test/prism/snapshots/seattlerb/block_args_no_kwargs.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,28 +12,27 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,13)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,11)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,10)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: - │ │ │ │ @ NoKeywordsParameterNode (location: (1,5)-(1,10)) - │ │ │ │ ├── operator_loc: (1,5)-(1,7) = "**" - │ │ │ │ └── keyword_loc: (1,7)-(1,10) = "nil" - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,10)-(1,11) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,12)-(1,13) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,13)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,11)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,10)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: + │ │ │ @ NoKeywordsParameterNode (location: (1,5)-(1,10)) + │ │ │ ├── operator_loc: (1,5)-(1,7) = "**" + │ │ │ └── keyword_loc: (1,7)-(1,10) = "nil" + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,10)-(1,11) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,12)-(1,13) = "}" diff --git a/test/prism/snapshots/seattlerb/block_args_opt1.txt b/test/prism/snapshots/seattlerb/block_args_opt1.txt index 0318342b83..4a5dc9b59b 100644 --- a/test/prism/snapshots/seattlerb/block_args_opt1.txt +++ b/test/prism/snapshots/seattlerb/block_args_opt1.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,24)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,24)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,47 +12,46 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,24)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,16)-(1,22)) - │ │ └── body: (length: 1) - │ │ └── @ ArrayNode (location: (1,16)-(1,22)) - │ │ ├── elements: (length: 2) - │ │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18)) - │ │ │ │ ├── name: :a - │ │ │ │ └── depth: 0 - │ │ │ └── @ LocalVariableReadNode (location: (1,20)-(1,21)) - │ │ │ ├── name: :b - │ │ │ └── depth: 0 - │ │ ├── opening_loc: (1,16)-(1,17) = "[" - │ │ ├── closing_loc: (1,21)-(1,22) = "]" - │ │ └── flags: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,23)-(1,24) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,24)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,12)-(1,14)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: + │ @ StatementsNode (location: (1,16)-(1,22)) + │ └── body: (length: 1) + │ └── @ ArrayNode (location: (1,16)-(1,22)) + │ ├── flags: ∅ + │ ├── elements: (length: 2) + │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18)) + │ │ │ ├── name: :a + │ │ │ └── depth: 0 + │ │ └── @ LocalVariableReadNode (location: (1,20)-(1,21)) + │ │ ├── name: :b + │ │ └── depth: 0 + │ ├── opening_loc: (1,16)-(1,17) = "[" + │ └── closing_loc: (1,21)-(1,22) = "]" + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,23)-(1,24) = "}" diff --git a/test/prism/snapshots/seattlerb/block_args_opt2.txt b/test/prism/snapshots/seattlerb/block_args_opt2.txt index a207cf244d..af334a87f7 100644 --- a/test/prism/snapshots/seattlerb/block_args_opt2.txt +++ b/test/prism/snapshots/seattlerb/block_args_opt2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,18)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,18)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,39 +12,38 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,18)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,16)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,6)-(1,14)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 2) - │ │ │ │ ├── @ OptionalParameterNode (location: (1,6)-(1,9)) - │ │ │ │ │ ├── name: :b - │ │ │ │ │ ├── name_loc: (1,6)-(1,7) = "b" - │ │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ │ └── value: - │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── @ OptionalParameterNode (location: (1,11)-(1,14)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,11)-(1,12) = "c" - │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,13)-(1,14)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,15)-(1,16) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,17)-(1,18) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,18)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,16)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,6)-(1,14)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 2) + │ │ │ ├── @ OptionalParameterNode (location: (1,6)-(1,9)) + │ │ │ │ ├── name: :b + │ │ │ │ ├── name_loc: (1,6)-(1,7) = "b" + │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ │ └── value: + │ │ │ │ @ IntegerNode (location: (1,8)-(1,9)) + │ │ │ │ └── flags: decimal + │ │ │ └── @ OptionalParameterNode (location: (1,11)-(1,14)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,11)-(1,12) = "c" + │ │ │ ├── operator_loc: (1,12)-(1,13) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,13)-(1,14)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,15)-(1,16) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,17)-(1,18) = "}" diff --git a/test/prism/snapshots/seattlerb/block_args_opt2_2.txt b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt index a79041020d..ee99843c6f 100644 --- a/test/prism/snapshots/seattlerb/block_args_opt2_2.txt +++ b/test/prism/snapshots/seattlerb/block_args_opt2_2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,35)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,35)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,57 +12,56 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,35)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,23)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,22)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 2) - │ │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ │ ├── name: :b - │ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ │ └── value: - │ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,16)-(1,17) = "c" - │ │ │ │ ├── operator_loc: (1,18)-(1,19) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,20)-(1,22)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,22)-(1,23) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,24)-(1,33)) - │ │ └── body: (length: 1) - │ │ └── @ ArrayNode (location: (1,24)-(1,33)) - │ │ ├── elements: (length: 3) - │ │ │ ├── @ LocalVariableReadNode (location: (1,25)-(1,26)) - │ │ │ │ ├── name: :a - │ │ │ │ └── depth: 0 - │ │ │ ├── @ LocalVariableReadNode (location: (1,28)-(1,29)) - │ │ │ │ ├── name: :b - │ │ │ │ └── depth: 0 - │ │ │ └── @ LocalVariableReadNode (location: (1,31)-(1,32)) - │ │ │ ├── name: :c - │ │ │ └── depth: 0 - │ │ ├── opening_loc: (1,24)-(1,25) = "[" - │ │ ├── closing_loc: (1,32)-(1,33) = "]" - │ │ └── flags: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,34)-(1,35) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,35)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,23)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,22)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 2) + │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ │ ├── name: :b + │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ │ └── value: + │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) + │ │ │ │ └── flags: decimal + │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,16)-(1,17) = "c" + │ │ │ ├── operator_loc: (1,18)-(1,19) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,20)-(1,22)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,22)-(1,23) = "|" + ├── body: + │ @ StatementsNode (location: (1,24)-(1,33)) + │ └── body: (length: 1) + │ └── @ ArrayNode (location: (1,24)-(1,33)) + │ ├── flags: ∅ + │ ├── elements: (length: 3) + │ │ ├── @ LocalVariableReadNode (location: (1,25)-(1,26)) + │ │ │ ├── name: :a + │ │ │ └── depth: 0 + │ │ ├── @ LocalVariableReadNode (location: (1,28)-(1,29)) + │ │ │ ├── name: :b + │ │ │ └── depth: 0 + │ │ └── @ LocalVariableReadNode (location: (1,31)-(1,32)) + │ │ ├── name: :c + │ │ └── depth: 0 + │ ├── opening_loc: (1,24)-(1,25) = "[" + │ └── closing_loc: (1,32)-(1,33) = "]" + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,34)-(1,35) = "}" diff --git a/test/prism/snapshots/seattlerb/block_args_opt3.txt b/test/prism/snapshots/seattlerb/block_args_opt3.txt index 0c1f87b36a..016fdc6358 100644 --- a/test/prism/snapshots/seattlerb/block_args_opt3.txt +++ b/test/prism/snapshots/seattlerb/block_args_opt3.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,42)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,42)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,64 +12,63 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,42)) - │ ├── locals: [:a, :b, :c, :d] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,27)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,26)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 2) - │ │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ │ ├── name: :b - │ │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ │ └── value: - │ │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,16)-(1,17) = "c" - │ │ │ │ ├── operator_loc: (1,18)-(1,19) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,20)-(1,22)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,24)-(1,26)) - │ │ │ ├── name: :d - │ │ │ ├── name_loc: (1,25)-(1,26) = "d" - │ │ │ └── operator_loc: (1,24)-(1,25) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,26)-(1,27) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,28)-(1,40)) - │ │ └── body: (length: 1) - │ │ └── @ ArrayNode (location: (1,28)-(1,40)) - │ │ ├── elements: (length: 4) - │ │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30)) - │ │ │ │ ├── name: :a - │ │ │ │ └── depth: 0 - │ │ │ ├── @ LocalVariableReadNode (location: (1,32)-(1,33)) - │ │ │ │ ├── name: :b - │ │ │ │ └── depth: 0 - │ │ │ ├── @ LocalVariableReadNode (location: (1,35)-(1,36)) - │ │ │ │ ├── name: :c - │ │ │ │ └── depth: 0 - │ │ │ └── @ LocalVariableReadNode (location: (1,38)-(1,39)) - │ │ │ ├── name: :d - │ │ │ └── depth: 0 - │ │ ├── opening_loc: (1,28)-(1,29) = "[" - │ │ ├── closing_loc: (1,39)-(1,40) = "]" - │ │ └── flags: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,41)-(1,42) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,42)) + ├── locals: [:a, :b, :c, :d] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,27)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,26)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 2) + │ │ │ ├── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ │ ├── name: :b + │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ │ └── value: + │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) + │ │ │ │ └── flags: decimal + │ │ │ └── @ OptionalParameterNode (location: (1,16)-(1,22)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,16)-(1,17) = "c" + │ │ │ ├── operator_loc: (1,18)-(1,19) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,20)-(1,22)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,24)-(1,26)) + │ │ ├── name: :d + │ │ ├── name_loc: (1,25)-(1,26) = "d" + │ │ └── operator_loc: (1,24)-(1,25) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,26)-(1,27) = "|" + ├── body: + │ @ StatementsNode (location: (1,28)-(1,40)) + │ └── body: (length: 1) + │ └── @ ArrayNode (location: (1,28)-(1,40)) + │ ├── flags: ∅ + │ ├── elements: (length: 4) + │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30)) + │ │ │ ├── name: :a + │ │ │ └── depth: 0 + │ │ ├── @ LocalVariableReadNode (location: (1,32)-(1,33)) + │ │ │ ├── name: :b + │ │ │ └── depth: 0 + │ │ ├── @ LocalVariableReadNode (location: (1,35)-(1,36)) + │ │ │ ├── name: :c + │ │ │ └── depth: 0 + │ │ └── @ LocalVariableReadNode (location: (1,38)-(1,39)) + │ │ ├── name: :d + │ │ └── depth: 0 + │ ├── opening_loc: (1,28)-(1,29) = "[" + │ └── closing_loc: (1,39)-(1,40) = "]" + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,41)-(1,42) = "}" diff --git a/test/prism/snapshots/seattlerb/block_break.txt b/test/prism/snapshots/seattlerb/block_break.txt index 557ac8a744..502d60ed40 100644 --- a/test/prism/snapshots/seattlerb/block_break.txt +++ b/test/prism/snapshots/seattlerb/block_break.txt @@ -6,51 +6,51 @@ └── @ BreakNode (location: (1,0)-(1,26)) ├── arguments: │ @ ArgumentsNode (location: (1,6)-(1,26)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,6)-(1,26)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :foo - │ │ ├── message_loc: (1,6)-(1,9) = "foo" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (1,10)-(1,13)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ CallNode (location: (1,10)-(1,13)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :arg - │ │ │ │ ├── message_loc: (1,10)-(1,13) = "arg" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: - │ │ │ @ BlockNode (location: (1,14)-(1,26)) - │ │ │ ├── locals: [:bar] - │ │ │ ├── locals_body_index: 1 - │ │ │ ├── parameters: - │ │ │ │ @ BlockParametersNode (location: (1,17)-(1,22)) - │ │ │ │ ├── parameters: - │ │ │ │ │ @ ParametersNode (location: (1,18)-(1,21)) - │ │ │ │ │ ├── requireds: (length: 1) - │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,21)) - │ │ │ │ │ │ └── name: :bar - │ │ │ │ │ ├── optionals: (length: 0) - │ │ │ │ │ ├── rest: ∅ - │ │ │ │ │ ├── posts: (length: 0) - │ │ │ │ │ ├── keywords: (length: 0) - │ │ │ │ │ ├── keyword_rest: ∅ - │ │ │ │ │ └── block: ∅ - │ │ │ │ ├── locals: (length: 0) - │ │ │ │ ├── opening_loc: (1,17)-(1,18) = "|" - │ │ │ │ └── closing_loc: (1,21)-(1,22) = "|" - │ │ │ ├── body: ∅ - │ │ │ ├── opening_loc: (1,14)-(1,16) = "do" - │ │ │ └── closing_loc: (1,23)-(1,26) = "end" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,6)-(1,26)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :foo + │ ├── message_loc: (1,6)-(1,9) = "foo" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (1,10)-(1,13)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,10)-(1,13)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :arg + │ │ ├── message_loc: (1,10)-(1,13) = "arg" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── closing_loc: ∅ + │ └── block: + │ @ BlockNode (location: (1,14)-(1,26)) + │ ├── locals: [:bar] + │ ├── locals_body_index: 1 + │ ├── parameters: + │ │ @ BlockParametersNode (location: (1,17)-(1,22)) + │ │ ├── parameters: + │ │ │ @ ParametersNode (location: (1,18)-(1,21)) + │ │ │ ├── requireds: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,21)) + │ │ │ │ └── name: :bar + │ │ │ ├── optionals: (length: 0) + │ │ │ ├── rest: ∅ + │ │ │ ├── posts: (length: 0) + │ │ │ ├── keywords: (length: 0) + │ │ │ ├── keyword_rest: ∅ + │ │ │ └── block: ∅ + │ │ ├── locals: (length: 0) + │ │ ├── opening_loc: (1,17)-(1,18) = "|" + │ │ └── closing_loc: (1,21)-(1,22) = "|" + │ ├── body: ∅ + │ ├── opening_loc: (1,14)-(1,16) = "do" + │ └── closing_loc: (1,23)-(1,26) = "end" └── keyword_loc: (1,0)-(1,5) = "break" diff --git a/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt b/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt index e9e37fc104..363ee275fa 100644 --- a/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt +++ b/test/prism/snapshots/seattlerb/block_call_defn_call_block_call.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,11)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(3,4)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,50 +12,51 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(3,4)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ DefNode (location: (1,2)-(3,4)) - │ │ │ ├── name: :b - │ │ │ ├── name_loc: (1,6)-(1,7) = "b" - │ │ │ ├── receiver: ∅ - │ │ │ ├── parameters: - │ │ │ │ @ ParametersNode (location: (1,8)-(1,9)) - │ │ │ │ ├── requireds: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,9)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── optionals: (length: 0) - │ │ │ │ ├── rest: ∅ - │ │ │ │ ├── posts: (length: 0) - │ │ │ │ ├── keywords: (length: 0) - │ │ │ │ ├── keyword_rest: ∅ - │ │ │ │ └── block: ∅ - │ │ │ ├── body: - │ │ │ │ @ StatementsNode (location: (2,1)-(2,2)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ CallNode (location: (2,1)-(2,2)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :d - │ │ │ │ ├── message_loc: (2,1)-(2,2) = "d" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── locals: [:c] - │ │ │ ├── locals_body_index: 1 - │ │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def" - │ │ │ ├── operator_loc: ∅ - │ │ │ ├── lparen_loc: (1,7)-(1,8) = "(" - │ │ │ ├── rparen_loc: (1,9)-(1,10) = ")" - │ │ │ ├── equal_loc: ∅ - │ │ │ └── end_keyword_loc: (3,1)-(3,4) = "end" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ DefNode (location: (1,2)-(3,4)) + │ │ ├── name: :b + │ │ ├── name_loc: (1,6)-(1,7) = "b" + │ │ ├── receiver: ∅ + │ │ ├── parameters: + │ │ │ @ ParametersNode (location: (1,8)-(1,9)) + │ │ │ ├── requireds: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,8)-(1,9)) + │ │ │ │ └── name: :c + │ │ │ ├── optionals: (length: 0) + │ │ │ ├── rest: ∅ + │ │ │ ├── posts: (length: 0) + │ │ │ ├── keywords: (length: 0) + │ │ │ ├── keyword_rest: ∅ + │ │ │ └── block: ∅ + │ │ ├── body: + │ │ │ @ StatementsNode (location: (2,1)-(2,2)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ CallNode (location: (2,1)-(2,2)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :d + │ │ │ ├── message_loc: (2,1)-(2,2) = "d" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── locals: [:c] + │ │ ├── locals_body_index: 1 + │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def" + │ │ ├── operator_loc: ∅ + │ │ ├── lparen_loc: (1,7)-(1,8) = "(" + │ │ ├── rparen_loc: (1,9)-(1,10) = ")" + │ │ ├── equal_loc: ∅ + │ │ └── end_keyword_loc: (3,1)-(3,4) = "end" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (4,1)-(4,11)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (4,1)-(4,2)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :e @@ -62,20 +64,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (4,2)-(4,3) = "." ├── name: :f ├── message_loc: (4,3)-(4,4) = "f" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (4,5)-(4,11)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: ∅ - │ ├── opening_loc: (4,5)-(4,7) = "do" - │ └── closing_loc: (4,8)-(4,11) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (4,5)-(4,11)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: ∅ + ├── opening_loc: (4,5)-(4,7) = "do" + └── closing_loc: (4,8)-(4,11) = "end" diff --git a/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt b/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt index 434c01c6bd..e49d2b8d01 100644 --- a/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt +++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_brace_block.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(1,31)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,31)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,16)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,87 +18,84 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,1)-(1,2) = "." │ ├── name: :b │ ├── message_loc: (1,2)-(1,3) = "b" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,4)-(1,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,4)-(1,7)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :c - │ │ │ ├── message_loc: (1,4)-(1,5) = "c" - │ │ │ ├── opening_loc: (1,5)-(1,6) = "(" - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: (1,6)-(1,7) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,4)-(1,7)) + │ │ ├── flags: ∅ + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :c + │ │ ├── message_loc: (1,4)-(1,5) = "c" + │ │ ├── opening_loc: (1,5)-(1,6) = "(" + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: (1,6)-(1,7) = ")" + │ │ └── block: ∅ │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,8)-(1,16)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── parameters: ∅ - │ │ ├── body: - │ │ │ @ StatementsNode (location: (1,11)-(1,12)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (1,11)-(1,12)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :d - │ │ │ ├── message_loc: (1,11)-(1,12) = "d" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ ├── opening_loc: (1,8)-(1,10) = "do" - │ │ └── closing_loc: (1,13)-(1,16) = "end" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,8)-(1,16)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (1,11)-(1,12)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (1,11)-(1,12)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :d + │ │ ├── message_loc: (1,11)-(1,12) = "d" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── opening_loc: (1,8)-(1,10) = "do" + │ └── closing_loc: (1,13)-(1,16) = "end" ├── call_operator_loc: (1,16)-(1,17) = "." ├── name: :e ├── message_loc: (1,17)-(1,18) = "e" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,19)-(1,31)) - │ ├── locals: [:f] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,22)-(1,25)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,23)-(1,24)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,23)-(1,24)) - │ │ │ │ └── name: :f - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,22)-(1,23) = "|" - │ │ └── closing_loc: (1,24)-(1,25) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,26)-(1,27)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (1,26)-(1,27)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :g - │ │ ├── message_loc: (1,26)-(1,27) = "g" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── opening_loc: (1,19)-(1,21) = "do" - │ └── closing_loc: (1,28)-(1,31) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,19)-(1,31)) + ├── locals: [:f] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,22)-(1,25)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,23)-(1,24)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,23)-(1,24)) + │ │ │ └── name: :f + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,22)-(1,23) = "|" + │ └── closing_loc: (1,24)-(1,25) = "|" + ├── body: + │ @ StatementsNode (location: (1,26)-(1,27)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (1,26)-(1,27)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :g + │ ├── message_loc: (1,26)-(1,27) = "g" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,19)-(1,21) = "do" + └── closing_loc: (1,28)-(1,31) = "end" diff --git a/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt b/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt index c79d1cc775..0656b2e53e 100644 --- a/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt +++ b/test/prism/snapshots/seattlerb/block_call_dot_op2_cmd_args_do_block.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(1,33)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,33)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,16)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,100 +18,97 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,1)-(1,2) = "." │ ├── name: :b │ ├── message_loc: (1,2)-(1,3) = "b" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,4)-(1,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,4)-(1,7)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :c - │ │ │ ├── message_loc: (1,4)-(1,5) = "c" - │ │ │ ├── opening_loc: (1,5)-(1,6) = "(" - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: (1,6)-(1,7) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,4)-(1,7)) + │ │ ├── flags: ∅ + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :c + │ │ ├── message_loc: (1,4)-(1,5) = "c" + │ │ ├── opening_loc: (1,5)-(1,6) = "(" + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: (1,6)-(1,7) = ")" + │ │ └── block: ∅ │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,8)-(1,16)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── parameters: ∅ - │ │ ├── body: - │ │ │ @ StatementsNode (location: (1,11)-(1,12)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (1,11)-(1,12)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :d - │ │ │ ├── message_loc: (1,11)-(1,12) = "d" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ ├── opening_loc: (1,8)-(1,10) = "do" - │ │ └── closing_loc: (1,13)-(1,16) = "end" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,8)-(1,16)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (1,11)-(1,12)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (1,11)-(1,12)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :d + │ │ ├── message_loc: (1,11)-(1,12) = "d" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── opening_loc: (1,8)-(1,10) = "do" + │ └── closing_loc: (1,13)-(1,16) = "end" ├── call_operator_loc: (1,16)-(1,17) = "." ├── name: :e ├── message_loc: (1,17)-(1,18) = "e" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,19)-(1,20)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,19)-(1,20)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :f - │ │ ├── message_loc: (1,19)-(1,20) = "f" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,19)-(1,20)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :f + │ ├── message_loc: (1,19)-(1,20) = "f" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,21)-(1,33)) - │ ├── locals: [:g] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,24)-(1,27)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,25)-(1,26)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,25)-(1,26)) - │ │ │ │ └── name: :g - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,24)-(1,25) = "|" - │ │ └── closing_loc: (1,26)-(1,27) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,28)-(1,29)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (1,28)-(1,29)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :h - │ │ ├── message_loc: (1,28)-(1,29) = "h" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── opening_loc: (1,21)-(1,23) = "do" - │ └── closing_loc: (1,30)-(1,33) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,21)-(1,33)) + ├── locals: [:g] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,24)-(1,27)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,25)-(1,26)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,25)-(1,26)) + │ │ │ └── name: :g + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,24)-(1,25) = "|" + │ └── closing_loc: (1,26)-(1,27) = "|" + ├── body: + │ @ StatementsNode (location: (1,28)-(1,29)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (1,28)-(1,29)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :h + │ ├── message_loc: (1,28)-(1,29) = "h" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,21)-(1,23) = "do" + └── closing_loc: (1,30)-(1,33) = "end" diff --git a/test/prism/snapshots/seattlerb/block_call_operation_colon.txt b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt index 61ea4563e8..ebe805b932 100644 --- a/test/prism/snapshots/seattlerb/block_call_operation_colon.txt +++ b/test/prism/snapshots/seattlerb/block_call_operation_colon.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(1,15)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,15)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,12)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,41 +18,38 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,1)-(1,2) = "." │ ├── name: :b │ ├── message_loc: (1,2)-(1,3) = "b" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,4)-(1,5)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :c - │ │ │ ├── message_loc: (1,4)-(1,5) = "c" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,4)-(1,5)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :c + │ │ ├── message_loc: (1,4)-(1,5) = "c" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,6)-(1,12)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── parameters: ∅ - │ │ ├── body: ∅ - │ │ ├── opening_loc: (1,6)-(1,8) = "do" - │ │ └── closing_loc: (1,9)-(1,12) = "end" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,6)-(1,12)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (1,6)-(1,8) = "do" + │ └── closing_loc: (1,9)-(1,12) = "end" ├── call_operator_loc: (1,12)-(1,14) = "::" ├── name: :d ├── message_loc: (1,14)-(1,15) = "d" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/block_call_operation_dot.txt b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt index 053c2bfae2..1824f897f6 100644 --- a/test/prism/snapshots/seattlerb/block_call_operation_dot.txt +++ b/test/prism/snapshots/seattlerb/block_call_operation_dot.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,12)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,41 +18,38 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,1)-(1,2) = "." │ ├── name: :b │ ├── message_loc: (1,2)-(1,3) = "b" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,4)-(1,5)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :c - │ │ │ ├── message_loc: (1,4)-(1,5) = "c" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,4)-(1,5)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :c + │ │ ├── message_loc: (1,4)-(1,5) = "c" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,6)-(1,12)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── parameters: ∅ - │ │ ├── body: ∅ - │ │ ├── opening_loc: (1,6)-(1,8) = "do" - │ │ └── closing_loc: (1,9)-(1,12) = "end" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,6)-(1,12)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (1,6)-(1,8) = "do" + │ └── closing_loc: (1,9)-(1,12) = "end" ├── call_operator_loc: (1,12)-(1,13) = "." ├── name: :d ├── message_loc: (1,13)-(1,14) = "d" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt b/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt index 8067e7ef96..69e5ddf6fc 100644 --- a/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt +++ b/test/prism/snapshots/seattlerb/block_call_paren_call_block_call.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(2,10)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,5)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,30 +12,31 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,5)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ ParenthesesNode (location: (1,2)-(1,5)) - │ │ │ ├── body: - │ │ │ │ @ StatementsNode (location: (1,3)-(1,4)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ CallNode (location: (1,3)-(1,4)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :b - │ │ │ │ ├── message_loc: (1,3)-(1,4) = "b" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── opening_loc: (1,2)-(1,3) = "(" - │ │ │ └── closing_loc: (1,4)-(1,5) = ")" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ ParenthesesNode (location: (1,2)-(1,5)) + │ │ ├── body: + │ │ │ @ StatementsNode (location: (1,3)-(1,4)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ CallNode (location: (1,3)-(1,4)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :b + │ │ │ ├── message_loc: (1,3)-(1,4) = "b" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "(" + │ │ └── closing_loc: (1,4)-(1,5) = ")" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (2,0)-(2,10)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (2,0)-(2,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :c @@ -42,20 +44,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (2,1)-(2,2) = "." ├── name: :d ├── message_loc: (2,2)-(2,3) = "d" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (2,4)-(2,10)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: ∅ - │ ├── opening_loc: (2,4)-(2,6) = "do" - │ └── closing_loc: (2,7)-(2,10) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (2,4)-(2,10)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: ∅ + ├── opening_loc: (2,4)-(2,6) = "do" + └── closing_loc: (2,7)-(2,10) = "end" diff --git a/test/prism/snapshots/seattlerb/block_command_operation_colon.txt b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt index 00982fc3c6..8f4439223f 100644 --- a/test/prism/snapshots/seattlerb/block_command_operation_colon.txt +++ b/test/prism/snapshots/seattlerb/block_command_operation_colon.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,11)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,36 +15,34 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,4)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ SymbolNode (location: (1,2)-(1,4)) - │ │ │ ├── opening_loc: (1,2)-(1,3) = ":" - │ │ │ ├── value_loc: (1,3)-(1,4) = "b" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "b" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ SymbolNode (location: (1,2)-(1,4)) + │ │ ├── opening_loc: (1,2)-(1,3) = ":" + │ │ ├── value_loc: (1,3)-(1,4) = "b" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "b" │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,5)-(1,11)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── parameters: ∅ - │ │ ├── body: ∅ - │ │ ├── opening_loc: (1,5)-(1,7) = "do" - │ │ └── closing_loc: (1,8)-(1,11) = "end" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,5)-(1,11)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (1,5)-(1,7) = "do" + │ └── closing_loc: (1,8)-(1,11) = "end" ├── call_operator_loc: (1,11)-(1,13) = "::" ├── name: :c ├── message_loc: (1,13)-(1,14) = "c" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,15)-(1,17)) - │ ├── arguments: (length: 1) - │ │ └── @ SymbolNode (location: (1,15)-(1,17)) - │ │ ├── opening_loc: (1,15)-(1,16) = ":" - │ │ ├── value_loc: (1,16)-(1,17) = "d" - │ │ ├── closing_loc: ∅ - │ │ └── unescaped: "d" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ SymbolNode (location: (1,15)-(1,17)) + │ ├── opening_loc: (1,15)-(1,16) = ":" + │ ├── value_loc: (1,16)-(1,17) = "d" + │ ├── closing_loc: ∅ + │ └── unescaped: "d" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/block_command_operation_dot.txt b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt index c0fc8e9c2b..ce44f8b75c 100644 --- a/test/prism/snapshots/seattlerb/block_command_operation_dot.txt +++ b/test/prism/snapshots/seattlerb/block_command_operation_dot.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,11)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,36 +15,34 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,4)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ SymbolNode (location: (1,2)-(1,4)) - │ │ │ ├── opening_loc: (1,2)-(1,3) = ":" - │ │ │ ├── value_loc: (1,3)-(1,4) = "b" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "b" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ SymbolNode (location: (1,2)-(1,4)) + │ │ ├── opening_loc: (1,2)-(1,3) = ":" + │ │ ├── value_loc: (1,3)-(1,4) = "b" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "b" │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,5)-(1,11)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── parameters: ∅ - │ │ ├── body: ∅ - │ │ ├── opening_loc: (1,5)-(1,7) = "do" - │ │ └── closing_loc: (1,8)-(1,11) = "end" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,5)-(1,11)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (1,5)-(1,7) = "do" + │ └── closing_loc: (1,8)-(1,11) = "end" ├── call_operator_loc: (1,11)-(1,12) = "." ├── name: :c ├── message_loc: (1,12)-(1,13) = "c" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,14)-(1,16)) - │ ├── arguments: (length: 1) - │ │ └── @ SymbolNode (location: (1,14)-(1,16)) - │ │ ├── opening_loc: (1,14)-(1,15) = ":" - │ │ ├── value_loc: (1,15)-(1,16) = "d" - │ │ ├── closing_loc: ∅ - │ │ └── unescaped: "d" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ SymbolNode (location: (1,14)-(1,16)) + │ ├── opening_loc: (1,14)-(1,15) = ":" + │ ├── value_loc: (1,15)-(1,16) = "d" + │ ├── closing_loc: ∅ + │ └── unescaped: "d" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt index 8c903f2b93..d3de3562a6 100644 --- a/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt +++ b/test/prism/snapshots/seattlerb/block_decomp_anon_splat_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,36 +12,35 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,14)) - │ ├── locals: [:a] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,11)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) - │ │ │ │ ├── lefts: (length: 0) - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,6)-(1,7)) - │ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*" - │ │ │ │ │ └── expression: ∅ - │ │ │ │ ├── rights: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :a - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,13)-(1,14) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,14)) + ├── locals: [:a] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,11)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) + │ │ │ ├── lefts: (length: 0) + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,6)-(1,7)) + │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*" + │ │ │ │ └── expression: ∅ + │ │ │ ├── rights: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :a + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,13)-(1,14) = "}" diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt index cb182552e6..dcb4415a70 100644 --- a/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt +++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,36 +12,35 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,14)) - │ ├── locals: [:b] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,11)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) - │ │ │ │ ├── lefts: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,9)-(1,10)) - │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" - │ │ │ │ │ └── expression: ∅ - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,13)-(1,14) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,14)) + ├── locals: [:b] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,11)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) + │ │ │ ├── lefts: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,9)-(1,10)) + │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" + │ │ │ │ └── expression: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,13)-(1,14) = "}" diff --git a/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt index f3a6ce858d..52a7a6b7f8 100644 --- a/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt +++ b/test/prism/snapshots/seattlerb/block_decomp_arg_splat_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,18)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,18)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,18)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,16)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,15)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,15)) - │ │ │ │ ├── lefts: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7)) - │ │ │ │ │ └── name: :a - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) - │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" - │ │ │ │ │ └── expression: - │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rights: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,14)-(1,15) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,15)-(1,16) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,17)-(1,18) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,18)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,16)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,15)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,15)) + │ │ │ ├── lefts: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7)) + │ │ │ │ └── name: :a + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) + │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" + │ │ │ │ └── expression: + │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ │ └── name: :b + │ │ │ ├── rights: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ │ └── name: :c + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,14)-(1,15) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,15)-(1,16) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,17)-(1,18) = "}" diff --git a/test/prism/snapshots/seattlerb/block_decomp_splat.txt b/test/prism/snapshots/seattlerb/block_decomp_splat.txt index 49e31bdd13..4be5573522 100644 --- a/test/prism/snapshots/seattlerb/block_decomp_splat.txt +++ b/test/prism/snapshots/seattlerb/block_decomp_splat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,12)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,12)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,36 +12,35 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,12)) - │ ├── locals: [:a] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,10)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,9)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,9)) - │ │ │ │ ├── lefts: (length: 0) - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,6)-(1,8)) - │ │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*" - │ │ │ │ │ └── expression: - │ │ │ │ │ @ RequiredParameterNode (location: (1,7)-(1,8)) - │ │ │ │ │ └── name: :a - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,8)-(1,9) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,9)-(1,10) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,11)-(1,12) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,12)) + ├── locals: [:a] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,10)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,9)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,9)) + │ │ │ ├── lefts: (length: 0) + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,6)-(1,8)) + │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "*" + │ │ │ │ └── expression: + │ │ │ │ @ RequiredParameterNode (location: (1,7)-(1,8)) + │ │ │ │ └── name: :a + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,8)-(1,9) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,9)-(1,10) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,11)-(1,12) = "}" diff --git a/test/prism/snapshots/seattlerb/block_kw.txt b/test/prism/snapshots/seattlerb/block_kw.txt index 5b2598035f..fa7cce4870 100644 --- a/test/prism/snapshots/seattlerb/block_kw.txt +++ b/test/prism/snapshots/seattlerb/block_kw.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,15)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,15)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :blah @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,5)-(1,15)) - │ ├── locals: [:k] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,7)-(1,13)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,8)-(1,12)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,12)) - │ │ │ │ ├── name: :k - │ │ │ │ ├── name_loc: (1,8)-(1,10) = "k:" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,10)-(1,12)) - │ │ │ │ └── flags: decimal - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,7)-(1,8) = "|" - │ │ └── closing_loc: (1,12)-(1,13) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,5)-(1,6) = "{" - │ └── closing_loc: (1,14)-(1,15) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,5)-(1,15)) + ├── locals: [:k] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,7)-(1,13)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,8)-(1,12)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 1) + │ │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,12)) + │ │ │ ├── name: :k + │ │ │ ├── name_loc: (1,8)-(1,10) = "k:" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,10)-(1,12)) + │ │ │ └── flags: decimal + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,7)-(1,8) = "|" + │ └── closing_loc: (1,12)-(1,13) = "|" + ├── body: ∅ + ├── opening_loc: (1,5)-(1,6) = "{" + └── closing_loc: (1,14)-(1,15) = "}" diff --git a/test/prism/snapshots/seattlerb/block_kw__required.txt b/test/prism/snapshots/seattlerb/block_kw__required.txt index aef63cce1e..6636ce987a 100644 --- a/test/prism/snapshots/seattlerb/block_kw__required.txt +++ b/test/prism/snapshots/seattlerb/block_kw__required.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :blah @@ -11,28 +12,27 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,5)-(1,16)) - │ ├── locals: [:k] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,8)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,9)-(1,11)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,9)-(1,11)) - │ │ │ │ ├── name: :k - │ │ │ │ └── name_loc: (1,9)-(1,11) = "k:" - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,8)-(1,9) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,5)-(1,7) = "do" - │ └── closing_loc: (1,13)-(1,16) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,5)-(1,16)) + ├── locals: [:k] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,8)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,9)-(1,11)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 1) + │ │ │ └── @ RequiredKeywordParameterNode (location: (1,9)-(1,11)) + │ │ │ ├── name: :k + │ │ │ └── name_loc: (1,9)-(1,11) = "k:" + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,8)-(1,9) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,5)-(1,7) = "do" + └── closing_loc: (1,13)-(1,16) = "end" diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt index f7e4743588..7469bdc5db 100644 --- a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt +++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,20)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,20)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :bl @@ -11,39 +12,38 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,3)-(1,20)) - │ ├── locals: [:kw] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,5)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,6)-(1,14)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,14)) - │ │ │ │ ├── name: :kw - │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:" - │ │ │ │ └── value: - │ │ │ │ @ SymbolNode (location: (1,10)-(1,14)) - │ │ │ │ ├── opening_loc: (1,10)-(1,11) = ":" - │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "val" - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,5)-(1,6) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,16)-(1,18)) - │ │ └── body: (length: 1) - │ │ └── @ LocalVariableReadNode (location: (1,16)-(1,18)) - │ │ ├── name: :kw - │ │ └── depth: 0 - │ ├── opening_loc: (1,3)-(1,4) = "{" - │ └── closing_loc: (1,19)-(1,20) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,3)-(1,20)) + ├── locals: [:kw] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,5)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,6)-(1,14)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 1) + │ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,14)) + │ │ │ ├── name: :kw + │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:" + │ │ │ └── value: + │ │ │ @ SymbolNode (location: (1,10)-(1,14)) + │ │ │ ├── opening_loc: (1,10)-(1,11) = ":" + │ │ │ ├── value_loc: (1,11)-(1,14) = "val" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "val" + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,5)-(1,6) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: + │ @ StatementsNode (location: (1,16)-(1,18)) + │ └── body: (length: 1) + │ └── @ LocalVariableReadNode (location: (1,16)-(1,18)) + │ ├── name: :kw + │ └── depth: 0 + ├── opening_loc: (1,3)-(1,4) = "{" + └── closing_loc: (1,19)-(1,20) = "}" diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt index 17a7e4bdca..23e807ba79 100644 --- a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt +++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,33)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,33)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :bl @@ -11,48 +12,47 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,3)-(1,33)) - │ ├── locals: [:kw, :kw2] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,5)-(1,28)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,6)-(1,26)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 2) - │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (1,6)-(1,14)) - │ │ │ │ │ ├── name: :kw - │ │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:" - │ │ │ │ │ └── value: - │ │ │ │ │ @ SymbolNode (location: (1,10)-(1,14)) - │ │ │ │ │ ├── opening_loc: (1,10)-(1,11) = ":" - │ │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val" - │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ └── unescaped: "val" - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,16)-(1,26)) - │ │ │ │ ├── name: :kw2 - │ │ │ │ ├── name_loc: (1,16)-(1,20) = "kw2:" - │ │ │ │ └── value: - │ │ │ │ @ SymbolNode (location: (1,21)-(1,26)) - │ │ │ │ ├── opening_loc: (1,21)-(1,22) = ":" - │ │ │ │ ├── value_loc: (1,22)-(1,26) = "val2" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "val2" - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,5)-(1,6) = "|" - │ │ └── closing_loc: (1,27)-(1,28) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,29)-(1,31)) - │ │ └── body: (length: 1) - │ │ └── @ LocalVariableReadNode (location: (1,29)-(1,31)) - │ │ ├── name: :kw - │ │ └── depth: 0 - │ ├── opening_loc: (1,3)-(1,4) = "{" - │ └── closing_loc: (1,32)-(1,33) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,3)-(1,33)) + ├── locals: [:kw, :kw2] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,5)-(1,28)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,6)-(1,26)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 2) + │ │ │ ├── @ OptionalKeywordParameterNode (location: (1,6)-(1,14)) + │ │ │ │ ├── name: :kw + │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:" + │ │ │ │ └── value: + │ │ │ │ @ SymbolNode (location: (1,10)-(1,14)) + │ │ │ │ ├── opening_loc: (1,10)-(1,11) = ":" + │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "val" + │ │ │ └── @ OptionalKeywordParameterNode (location: (1,16)-(1,26)) + │ │ │ ├── name: :kw2 + │ │ │ ├── name_loc: (1,16)-(1,20) = "kw2:" + │ │ │ └── value: + │ │ │ @ SymbolNode (location: (1,21)-(1,26)) + │ │ │ ├── opening_loc: (1,21)-(1,22) = ":" + │ │ │ ├── value_loc: (1,22)-(1,26) = "val2" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "val2" + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,5)-(1,6) = "|" + │ └── closing_loc: (1,27)-(1,28) = "|" + ├── body: + │ @ StatementsNode (location: (1,29)-(1,31)) + │ └── body: (length: 1) + │ └── @ LocalVariableReadNode (location: (1,29)-(1,31)) + │ ├── name: :kw + │ └── depth: 0 + ├── opening_loc: (1,3)-(1,4) = "{" + └── closing_loc: (1,32)-(1,33) = "}" diff --git a/test/prism/snapshots/seattlerb/block_next.txt b/test/prism/snapshots/seattlerb/block_next.txt index ff5cc42dcd..a72f57490e 100644 --- a/test/prism/snapshots/seattlerb/block_next.txt +++ b/test/prism/snapshots/seattlerb/block_next.txt @@ -6,51 +6,51 @@ └── @ NextNode (location: (1,0)-(1,25)) ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,25)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,5)-(1,25)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :foo - │ │ ├── message_loc: (1,5)-(1,8) = "foo" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (1,9)-(1,12)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ CallNode (location: (1,9)-(1,12)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :arg - │ │ │ │ ├── message_loc: (1,9)-(1,12) = "arg" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: - │ │ │ @ BlockNode (location: (1,13)-(1,25)) - │ │ │ ├── locals: [:bar] - │ │ │ ├── locals_body_index: 1 - │ │ │ ├── parameters: - │ │ │ │ @ BlockParametersNode (location: (1,16)-(1,21)) - │ │ │ │ ├── parameters: - │ │ │ │ │ @ ParametersNode (location: (1,17)-(1,20)) - │ │ │ │ │ ├── requireds: (length: 1) - │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,20)) - │ │ │ │ │ │ └── name: :bar - │ │ │ │ │ ├── optionals: (length: 0) - │ │ │ │ │ ├── rest: ∅ - │ │ │ │ │ ├── posts: (length: 0) - │ │ │ │ │ ├── keywords: (length: 0) - │ │ │ │ │ ├── keyword_rest: ∅ - │ │ │ │ │ └── block: ∅ - │ │ │ │ ├── locals: (length: 0) - │ │ │ │ ├── opening_loc: (1,16)-(1,17) = "|" - │ │ │ │ └── closing_loc: (1,20)-(1,21) = "|" - │ │ │ ├── body: ∅ - │ │ │ ├── opening_loc: (1,13)-(1,15) = "do" - │ │ │ └── closing_loc: (1,22)-(1,25) = "end" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,5)-(1,25)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :foo + │ ├── message_loc: (1,5)-(1,8) = "foo" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (1,9)-(1,12)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,9)-(1,12)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :arg + │ │ ├── message_loc: (1,9)-(1,12) = "arg" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── closing_loc: ∅ + │ └── block: + │ @ BlockNode (location: (1,13)-(1,25)) + │ ├── locals: [:bar] + │ ├── locals_body_index: 1 + │ ├── parameters: + │ │ @ BlockParametersNode (location: (1,16)-(1,21)) + │ │ ├── parameters: + │ │ │ @ ParametersNode (location: (1,17)-(1,20)) + │ │ │ ├── requireds: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,20)) + │ │ │ │ └── name: :bar + │ │ │ ├── optionals: (length: 0) + │ │ │ ├── rest: ∅ + │ │ │ ├── posts: (length: 0) + │ │ │ ├── keywords: (length: 0) + │ │ │ ├── keyword_rest: ∅ + │ │ │ └── block: ∅ + │ │ ├── locals: (length: 0) + │ │ ├── opening_loc: (1,16)-(1,17) = "|" + │ │ └── closing_loc: (1,20)-(1,21) = "|" + │ ├── body: ∅ + │ ├── opening_loc: (1,13)-(1,15) = "do" + │ └── closing_loc: (1,22)-(1,25) = "end" └── keyword_loc: (1,0)-(1,4) = "next" diff --git a/test/prism/snapshots/seattlerb/block_opt_arg.txt b/test/prism/snapshots/seattlerb/block_opt_arg.txt index 340047a301..c0e90ed132 100644 --- a/test/prism/snapshots/seattlerb/block_opt_arg.txt +++ b/test/prism/snapshots/seattlerb/block_opt_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,34 +12,33 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,14)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,11)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b" - │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,7)-(1,8)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11)) - │ │ │ │ └── name: :c - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,13)-(1,14) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,14)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,11)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,5)-(1,6) = "b" + │ │ │ ├── operator_loc: (1,6)-(1,7) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,7)-(1,8)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ └── name: :c + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,13)-(1,14) = "}" diff --git a/test/prism/snapshots/seattlerb/block_opt_splat.txt b/test/prism/snapshots/seattlerb/block_opt_splat.txt index 23aad10246..dfdd8926cd 100644 --- a/test/prism/snapshots/seattlerb/block_opt_splat.txt +++ b/test/prism/snapshots/seattlerb/block_opt_splat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,36 +12,35 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,10)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,12)-(1,14)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,13)-(1,14) = "c" - │ │ │ │ └── operator_loc: (1,12)-(1,13) = "*" - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,10)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,5)-(1,6) = "b" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,10)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,12)-(1,14)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,13)-(1,14) = "c" + │ │ │ └── operator_loc: (1,12)-(1,13) = "*" + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt b/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt index 3994cef507..444baeb8d0 100644 --- a/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt +++ b/test/prism/snapshots/seattlerb/block_opt_splat_arg_block_omfg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,22)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,22)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,42 +12,41 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,22)) - │ ├── locals: [:b, :c, :d, :e] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,20)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,19)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b" - │ │ │ │ ├── operator_loc: (1,6)-(1,7) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,7)-(1,8)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,10)-(1,12)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,11)-(1,12) = "c" - │ │ │ │ └── operator_loc: (1,10)-(1,11) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) - │ │ │ │ └── name: :d - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,17)-(1,19)) - │ │ │ ├── name: :e - │ │ │ ├── name_loc: (1,18)-(1,19) = "e" - │ │ │ └── operator_loc: (1,17)-(1,18) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,19)-(1,20) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,21)-(1,22) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,22)) + ├── locals: [:b, :c, :d, :e] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,20)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,19)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,8)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,5)-(1,6) = "b" + │ │ │ ├── operator_loc: (1,6)-(1,7) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,7)-(1,8)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,10)-(1,12)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,11)-(1,12) = "c" + │ │ │ └── operator_loc: (1,10)-(1,11) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) + │ │ │ └── name: :d + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,17)-(1,19)) + │ │ ├── name: :e + │ │ ├── name_loc: (1,18)-(1,19) = "e" + │ │ └── operator_loc: (1,17)-(1,18) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,19)-(1,20) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,21)-(1,22) = "}" diff --git a/test/prism/snapshots/seattlerb/block_optarg.txt b/test/prism/snapshots/seattlerb/block_optarg.txt index 998be35976..52f8731a7b 100644 --- a/test/prism/snapshots/seattlerb/block_optarg.txt +++ b/test/prism/snapshots/seattlerb/block_optarg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,35 +12,34 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,14)) - │ ├── locals: [:b] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,11)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "b" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ SymbolNode (location: (1,9)-(1,11)) - │ │ │ │ ├── opening_loc: (1,9)-(1,10) = ":" - │ │ │ │ ├── value_loc: (1,10)-(1,11) = "c" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "c" - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,13)-(1,14) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,14)) + ├── locals: [:b] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,11)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,5)-(1,6) = "b" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ SymbolNode (location: (1,9)-(1,11)) + │ │ │ ├── opening_loc: (1,9)-(1,10) = ":" + │ │ │ ├── value_loc: (1,10)-(1,11) = "c" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "c" + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,13)-(1,14) = "}" diff --git a/test/prism/snapshots/seattlerb/block_paren_splat.txt b/test/prism/snapshots/seattlerb/block_paren_splat.txt index f6b32c8f94..a34e0bca37 100644 --- a/test/prism/snapshots/seattlerb/block_paren_splat.txt +++ b/test/prism/snapshots/seattlerb/block_paren_splat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,15)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,15)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,15)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,13)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,12)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,12)) - │ │ │ │ ├── lefts: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) - │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" - │ │ │ │ │ └── expression: - │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,12)-(1,13) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,14)-(1,15) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,15)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,13)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,12)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,12)) + │ │ │ ├── lefts: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,6)-(1,7)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) + │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" + │ │ │ │ └── expression: + │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ │ └── name: :c + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,12)-(1,13) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,14)-(1,15) = "}" diff --git a/test/prism/snapshots/seattlerb/block_reg_optarg.txt b/test/prism/snapshots/seattlerb/block_reg_optarg.txt index 8e01cd401c..389e560964 100644 --- a/test/prism/snapshots/seattlerb/block_reg_optarg.txt +++ b/test/prism/snapshots/seattlerb/block_reg_optarg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,37 +12,36 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "c" - │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ └── value: - │ │ │ │ @ SymbolNode (location: (1,12)-(1,14)) - │ │ │ │ ├── opening_loc: (1,12)-(1,13) = ":" - │ │ │ │ ├── value_loc: (1,13)-(1,14) = "d" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "d" - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,8)-(1,9) = "c" + │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ └── value: + │ │ │ @ SymbolNode (location: (1,12)-(1,14)) + │ │ │ ├── opening_loc: (1,12)-(1,13) = ":" + │ │ │ ├── value_loc: (1,13)-(1,14) = "d" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "d" + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/block_return.txt b/test/prism/snapshots/seattlerb/block_return.txt index f361704d01..3764cac9c8 100644 --- a/test/prism/snapshots/seattlerb/block_return.txt +++ b/test/prism/snapshots/seattlerb/block_return.txt @@ -7,50 +7,50 @@ ├── keyword_loc: (1,0)-(1,6) = "return" └── arguments: @ ArgumentsNode (location: (1,7)-(1,27)) - ├── arguments: (length: 1) - │ └── @ CallNode (location: (1,7)-(1,27)) - │ ├── receiver: ∅ - │ ├── call_operator_loc: ∅ - │ ├── name: :foo - │ ├── message_loc: (1,7)-(1,10) = "foo" - │ ├── opening_loc: ∅ - │ ├── arguments: - │ │ @ ArgumentsNode (location: (1,11)-(1,14)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,11)-(1,14)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :arg - │ │ │ ├── message_loc: (1,11)-(1,14) = "arg" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── flags: ∅ - │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,15)-(1,27)) - │ │ ├── locals: [:bar] - │ │ ├── locals_body_index: 1 - │ │ ├── parameters: - │ │ │ @ BlockParametersNode (location: (1,18)-(1,23)) - │ │ │ ├── parameters: - │ │ │ │ @ ParametersNode (location: (1,19)-(1,22)) - │ │ │ │ ├── requireds: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,19)-(1,22)) - │ │ │ │ │ └── name: :bar - │ │ │ │ ├── optionals: (length: 0) - │ │ │ │ ├── rest: ∅ - │ │ │ │ ├── posts: (length: 0) - │ │ │ │ ├── keywords: (length: 0) - │ │ │ │ ├── keyword_rest: ∅ - │ │ │ │ └── block: ∅ - │ │ │ ├── locals: (length: 0) - │ │ │ ├── opening_loc: (1,18)-(1,19) = "|" - │ │ │ └── closing_loc: (1,22)-(1,23) = "|" - │ │ ├── body: ∅ - │ │ ├── opening_loc: (1,15)-(1,17) = "do" - │ │ └── closing_loc: (1,24)-(1,27) = "end" - │ └── flags: ∅ - └── flags: ∅ + ├── flags: ∅ + └── arguments: (length: 1) + └── @ CallNode (location: (1,7)-(1,27)) + ├── flags: ∅ + ├── receiver: ∅ + ├── call_operator_loc: ∅ + ├── name: :foo + ├── message_loc: (1,7)-(1,10) = "foo" + ├── opening_loc: ∅ + ├── arguments: + │ @ ArgumentsNode (location: (1,11)-(1,14)) + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,11)-(1,14)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :arg + │ ├── message_loc: (1,11)-(1,14) = "arg" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── closing_loc: ∅ + └── block: + @ BlockNode (location: (1,15)-(1,27)) + ├── locals: [:bar] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,18)-(1,23)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,19)-(1,22)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,19)-(1,22)) + │ │ │ └── name: :bar + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,18)-(1,19) = "|" + │ └── closing_loc: (1,22)-(1,23) = "|" + ├── body: ∅ + ├── opening_loc: (1,15)-(1,17) = "do" + └── closing_loc: (1,24)-(1,27) = "end" diff --git a/test/prism/snapshots/seattlerb/block_scope.txt b/test/prism/snapshots/seattlerb/block_scope.txt index 409c544f39..cccf6b79a2 100644 --- a/test/prism/snapshots/seattlerb/block_scope.txt +++ b/test/prism/snapshots/seattlerb/block_scope.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,10)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,10)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,19 +12,18 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,10)) - │ ├── locals: [:b] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,8)) - │ │ ├── parameters: ∅ - │ │ ├── locals: (length: 1) - │ │ │ └── @ BlockLocalVariableNode (location: (1,6)-(1,7)) - │ │ │ └── name: :b - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,7)-(1,8) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,9)-(1,10) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,10)) + ├── locals: [:b] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,8)) + │ ├── parameters: ∅ + │ ├── locals: (length: 1) + │ │ └── @ BlockLocalVariableNode (location: (1,6)-(1,7)) + │ │ └── name: :b + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,7)-(1,8) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,9)-(1,10) = "}" diff --git a/test/prism/snapshots/seattlerb/block_splat_reg.txt b/test/prism/snapshots/seattlerb/block_splat_reg.txt index 93b5dd5ea6..0cf4b62f7d 100644 --- a/test/prism/snapshots/seattlerb/block_splat_reg.txt +++ b/test/prism/snapshots/seattlerb/block_splat_reg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,13)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,11)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,10)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,5)-(1,7)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,6)-(1,7) = "b" - │ │ │ │ └── operator_loc: (1,5)-(1,6) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ └── name: :c - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,10)-(1,11) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,12)-(1,13) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,13)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,11)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,10)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,5)-(1,7)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,6)-(1,7) = "b" + │ │ │ └── operator_loc: (1,5)-(1,6) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ └── name: :c + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,10)-(1,11) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,12)-(1,13) = "}" diff --git a/test/prism/snapshots/seattlerb/bug169.txt b/test/prism/snapshots/seattlerb/bug169.txt index 22ef18c5c1..22d8e4c48f 100644 --- a/test/prism/snapshots/seattlerb/bug169.txt +++ b/test/prism/snapshots/seattlerb/bug169.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :m @@ -11,19 +12,18 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,4)) - │ ├── arguments: (length: 1) - │ │ └── @ ParenthesesNode (location: (1,2)-(1,4)) - │ │ ├── body: ∅ - │ │ ├── opening_loc: (1,2)-(1,3) = "(" - │ │ └── closing_loc: (1,3)-(1,4) = ")" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ParenthesesNode (location: (1,2)-(1,4)) + │ ├── body: ∅ + │ ├── opening_loc: (1,2)-(1,3) = "(" + │ └── closing_loc: (1,3)-(1,4) = ")" ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,5)-(1,7)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: ∅ - │ ├── opening_loc: (1,5)-(1,6) = "{" - │ └── closing_loc: (1,6)-(1,7) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,5)-(1,7)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: ∅ + ├── opening_loc: (1,5)-(1,6) = "{" + └── closing_loc: (1,6)-(1,7) = "}" diff --git a/test/prism/snapshots/seattlerb/bug179.txt b/test/prism/snapshots/seattlerb/bug179.txt index 0951879111..11620b2dea 100644 --- a/test/prism/snapshots/seattlerb/bug179.txt +++ b/test/prism/snapshots/seattlerb/bug179.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,9)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :p @@ -11,18 +12,17 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,9)) - │ ├── arguments: (length: 1) - │ │ └── @ RangeNode (location: (1,2)-(1,9)) - │ │ ├── left: - │ │ │ @ ParenthesesNode (location: (1,2)-(1,4)) - │ │ │ ├── body: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "(" - │ │ │ └── closing_loc: (1,3)-(1,4) = ")" - │ │ ├── right: - │ │ │ @ NilNode (location: (1,6)-(1,9)) - │ │ ├── operator_loc: (1,4)-(1,6) = ".." - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ RangeNode (location: (1,2)-(1,9)) + │ ├── flags: ∅ + │ ├── left: + │ │ @ ParenthesesNode (location: (1,2)-(1,4)) + │ │ ├── body: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "(" + │ │ └── closing_loc: (1,3)-(1,4) = ")" + │ ├── right: + │ │ @ NilNode (location: (1,6)-(1,9)) + │ └── operator_loc: (1,4)-(1,6) = ".." ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bug190.txt b/test/prism/snapshots/seattlerb/bug190.txt index fec48914c9..ef4411ddb7 100644 --- a/test/prism/snapshots/seattlerb/bug190.txt +++ b/test/prism/snapshots/seattlerb/bug190.txt @@ -4,8 +4,8 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ RegularExpressionNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── opening_loc: (1,0)-(1,3) = "%r'" ├── content_loc: (1,3)-(1,5) = "\\'" ├── closing_loc: (1,5)-(1,6) = "'" - ├── unescaped: "\\'" - └── flags: ∅ + └── unescaped: "\\'" diff --git a/test/prism/snapshots/seattlerb/bug191.txt b/test/prism/snapshots/seattlerb/bug191.txt index c617c4a79a..b9cbac0d1c 100644 --- a/test/prism/snapshots/seattlerb/bug191.txt +++ b/test/prism/snapshots/seattlerb/bug191.txt @@ -7,6 +7,7 @@ │ ├── if_keyword_loc: ∅ │ ├── predicate: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -14,8 +15,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── then_keyword_loc: (1,2)-(1,3) = "?" │ ├── statements: │ │ @ StatementsNode (location: (1,4)-(1,6)) @@ -33,6 +33,7 @@ │ │ │ @ StatementsNode (location: (1,8)-(1,9)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (1,8)-(1,9)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :b @@ -40,14 +41,14 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ └── @ IfNode (location: (3,0)-(3,9)) ├── if_keyword_loc: ∅ ├── predicate: │ @ CallNode (location: (3,0)-(3,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -55,8 +56,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── then_keyword_loc: (3,2)-(3,3) = "?" ├── statements: │ @ StatementsNode (location: (3,4)-(3,6)) @@ -74,6 +74,7 @@ │ │ @ StatementsNode (location: (3,8)-(3,9)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (3,8)-(3,9)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -81,7 +82,6 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── end_keyword_loc: ∅ └── end_keyword_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/bug236.txt b/test/prism/snapshots/seattlerb/bug236.txt index 4aceae0e77..65339efa8b 100644 --- a/test/prism/snapshots/seattlerb/bug236.txt +++ b/test/prism/snapshots/seattlerb/bug236.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(3,6)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,7)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :x @@ -11,32 +12,32 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,1)-(1,7)) - │ │ ├── locals: [:a] - │ │ ├── locals_body_index: 1 - │ │ ├── parameters: - │ │ │ @ BlockParametersNode (location: (1,2)-(1,6)) - │ │ │ ├── parameters: - │ │ │ │ @ ParametersNode (location: (1,3)-(1,5)) - │ │ │ │ ├── requireds: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4)) - │ │ │ │ │ └── name: :a - │ │ │ │ ├── optionals: (length: 0) - │ │ │ │ ├── rest: - │ │ │ │ │ @ ImplicitRestNode (location: (1,4)-(1,5)) - │ │ │ │ ├── posts: (length: 0) - │ │ │ │ ├── keywords: (length: 0) - │ │ │ │ ├── keyword_rest: ∅ - │ │ │ │ └── block: ∅ - │ │ │ ├── locals: (length: 0) - │ │ │ ├── opening_loc: (1,2)-(1,3) = "|" - │ │ │ └── closing_loc: (1,5)-(1,6) = "|" - │ │ ├── body: ∅ - │ │ ├── opening_loc: (1,1)-(1,2) = "{" - │ │ └── closing_loc: (1,6)-(1,7) = "}" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,1)-(1,7)) + │ ├── locals: [:a] + │ ├── locals_body_index: 1 + │ ├── parameters: + │ │ @ BlockParametersNode (location: (1,2)-(1,6)) + │ │ ├── parameters: + │ │ │ @ ParametersNode (location: (1,3)-(1,5)) + │ │ │ ├── requireds: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,3)-(1,4)) + │ │ │ │ └── name: :a + │ │ │ ├── optionals: (length: 0) + │ │ │ ├── rest: + │ │ │ │ @ ImplicitRestNode (location: (1,4)-(1,5)) + │ │ │ ├── posts: (length: 0) + │ │ │ ├── keywords: (length: 0) + │ │ │ ├── keyword_rest: ∅ + │ │ │ └── block: ∅ + │ │ ├── locals: (length: 0) + │ │ ├── opening_loc: (1,2)-(1,3) = "|" + │ │ └── closing_loc: (1,5)-(1,6) = "|" + │ ├── body: ∅ + │ ├── opening_loc: (1,1)-(1,2) = "{" + │ └── closing_loc: (1,6)-(1,7) = "}" └── @ CallNode (location: (3,0)-(3,6)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -44,27 +45,26 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (3,1)-(3,6)) - │ ├── locals: [:a] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (3,2)-(3,5)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (3,3)-(3,4)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (3,3)-(3,4)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (3,2)-(3,3) = "|" - │ │ └── closing_loc: (3,4)-(3,5) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (3,1)-(3,2) = "{" - │ └── closing_loc: (3,5)-(3,6) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (3,1)-(3,6)) + ├── locals: [:a] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (3,2)-(3,5)) + │ ├── parameters: + │ │ @ ParametersNode (location: (3,3)-(3,4)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (3,3)-(3,4)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (3,2)-(3,3) = "|" + │ └── closing_loc: (3,4)-(3,5) = "|" + ├── body: ∅ + ├── opening_loc: (3,1)-(3,2) = "{" + └── closing_loc: (3,5)-(3,6) = "}" diff --git a/test/prism/snapshots/seattlerb/bug290.txt b/test/prism/snapshots/seattlerb/bug290.txt index ae57cfed23..e0633eb815 100644 --- a/test/prism/snapshots/seattlerb/bug290.txt +++ b/test/prism/snapshots/seattlerb/bug290.txt @@ -9,6 +9,7 @@ │ @ StatementsNode (location: (2,2)-(2,5)) │ └── body: (length: 1) │ └── @ CallNode (location: (2,2)-(2,5)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :foo @@ -16,8 +17,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── rescue_clause: ∅ ├── else_clause: ∅ ├── ensure_clause: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_187.txt b/test/prism/snapshots/seattlerb/bug_187.txt index 99feff8208..5630cbf9c9 100644 --- a/test/prism/snapshots/seattlerb/bug_187.txt +++ b/test/prism/snapshots/seattlerb/bug_187.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :private @@ -11,51 +12,50 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,8)-(3,3)) - │ ├── arguments: (length: 1) - │ │ └── @ DefNode (location: (1,8)-(3,3)) - │ │ ├── name: :f - │ │ ├── name_loc: (1,12)-(1,13) = "f" - │ │ ├── receiver: ∅ - │ │ ├── parameters: ∅ - │ │ ├── body: - │ │ │ @ StatementsNode (location: (2,0)-(2,10)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (2,0)-(2,10)) - │ │ │ ├── receiver: - │ │ │ │ @ CallNode (location: (2,0)-(2,1)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :a - │ │ │ │ ├── message_loc: (2,0)-(2,1) = "a" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── call_operator_loc: (2,1)-(2,2) = "." - │ │ │ ├── name: :b - │ │ │ ├── message_loc: (2,2)-(2,3) = "b" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: - │ │ │ │ @ BlockNode (location: (2,4)-(2,10)) - │ │ │ │ ├── locals: [] - │ │ │ │ ├── locals_body_index: 0 - │ │ │ │ ├── parameters: ∅ - │ │ │ │ ├── body: ∅ - │ │ │ │ ├── opening_loc: (2,4)-(2,6) = "do" - │ │ │ │ └── closing_loc: (2,7)-(2,10) = "end" - │ │ │ └── flags: ∅ - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── def_keyword_loc: (1,8)-(1,11) = "def" - │ │ ├── operator_loc: ∅ - │ │ ├── lparen_loc: ∅ - │ │ ├── rparen_loc: ∅ - │ │ ├── equal_loc: ∅ - │ │ └── end_keyword_loc: (3,0)-(3,3) = "end" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ DefNode (location: (1,8)-(3,3)) + │ ├── name: :f + │ ├── name_loc: (1,12)-(1,13) = "f" + │ ├── receiver: ∅ + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (2,0)-(2,10)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (2,0)-(2,10)) + │ │ ├── flags: ∅ + │ │ ├── receiver: + │ │ │ @ CallNode (location: (2,0)-(2,1)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :a + │ │ │ ├── message_loc: (2,0)-(2,1) = "a" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── call_operator_loc: (2,1)-(2,2) = "." + │ │ ├── name: :b + │ │ ├── message_loc: (2,2)-(2,3) = "b" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: + │ │ @ BlockNode (location: (2,4)-(2,10)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── parameters: ∅ + │ │ ├── body: ∅ + │ │ ├── opening_loc: (2,4)-(2,6) = "do" + │ │ └── closing_loc: (2,7)-(2,10) = "end" + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── def_keyword_loc: (1,8)-(1,11) = "def" + │ ├── operator_loc: ∅ + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (3,0)-(3,3) = "end" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_249.txt b/test/prism/snapshots/seattlerb/bug_249.txt index 8bf56e31c4..cff5210a30 100644 --- a/test/prism/snapshots/seattlerb/bug_249.txt +++ b/test/prism/snapshots/seattlerb/bug_249.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,28)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(4,28)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :mount @@ -11,76 +12,75 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,6)-(4,28)) - │ ├── arguments: (length: 2) - │ │ ├── @ CallNode (location: (1,6)-(4,9)) - │ │ │ ├── receiver: - │ │ │ │ @ ParenthesesNode (location: (1,6)-(4,5)) - │ │ │ │ ├── body: - │ │ │ │ │ @ StatementsNode (location: (1,7)-(4,4)) - │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ └── @ CallNode (location: (1,7)-(4,4)) - │ │ │ │ │ ├── receiver: - │ │ │ │ │ │ @ ConstantReadNode (location: (1,7)-(1,12)) - │ │ │ │ │ │ └── name: :Class - │ │ │ │ │ ├── call_operator_loc: (1,12)-(1,13) = "." - │ │ │ │ │ ├── name: :new - │ │ │ │ │ ├── message_loc: (1,13)-(1,16) = "new" - │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ ├── block: - │ │ │ │ │ │ @ BlockNode (location: (1,17)-(4,4)) - │ │ │ │ │ │ ├── locals: [] - │ │ │ │ │ │ ├── locals_body_index: 0 - │ │ │ │ │ │ ├── parameters: ∅ - │ │ │ │ │ │ ├── body: - │ │ │ │ │ │ │ @ StatementsNode (location: (2,0)-(3,3)) - │ │ │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ │ │ └── @ DefNode (location: (2,0)-(3,3)) - │ │ │ │ │ │ │ ├── name: :initialize - │ │ │ │ │ │ │ ├── name_loc: (2,4)-(2,14) = "initialize" - │ │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ │ ├── parameters: ∅ - │ │ │ │ │ │ │ ├── body: ∅ - │ │ │ │ │ │ │ ├── locals: [] - │ │ │ │ │ │ │ ├── locals_body_index: 0 - │ │ │ │ │ │ │ ├── def_keyword_loc: (2,0)-(2,3) = "def" - │ │ │ │ │ │ │ ├── operator_loc: ∅ - │ │ │ │ │ │ │ ├── lparen_loc: ∅ - │ │ │ │ │ │ │ ├── rparen_loc: ∅ - │ │ │ │ │ │ │ ├── equal_loc: ∅ - │ │ │ │ │ │ │ └── end_keyword_loc: (3,0)-(3,3) = "end" - │ │ │ │ │ │ ├── opening_loc: (1,17)-(1,19) = "do" - │ │ │ │ │ │ └── closing_loc: (4,1)-(4,4) = "end" - │ │ │ │ │ └── flags: ∅ - │ │ │ │ ├── opening_loc: (1,6)-(1,7) = "(" - │ │ │ │ └── closing_loc: (4,4)-(4,5) = ")" - │ │ │ ├── call_operator_loc: (4,5)-(4,6) = "." - │ │ │ ├── name: :new - │ │ │ ├── message_loc: (4,6)-(4,9) = "new" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ └── @ KeywordHashNode (location: (4,11)-(4,28)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (4,11)-(4,28)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (4,11)-(4,14)) - │ │ │ ├── opening_loc: (4,11)-(4,12) = ":" - │ │ │ ├── value_loc: (4,12)-(4,14) = "at" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "at" - │ │ ├── value: - │ │ │ @ StringNode (location: (4,18)-(4,28)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (4,18)-(4,19) = "'" - │ │ │ ├── content_loc: (4,19)-(4,27) = "endpoint" - │ │ │ ├── closing_loc: (4,27)-(4,28) = "'" - │ │ │ └── unescaped: "endpoint" - │ │ └── operator_loc: (4,15)-(4,17) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ CallNode (location: (1,6)-(4,9)) + │ │ ├── flags: ∅ + │ │ ├── receiver: + │ │ │ @ ParenthesesNode (location: (1,6)-(4,5)) + │ │ │ ├── body: + │ │ │ │ @ StatementsNode (location: (1,7)-(4,4)) + │ │ │ │ └── body: (length: 1) + │ │ │ │ └── @ CallNode (location: (1,7)-(4,4)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── receiver: + │ │ │ │ │ @ ConstantReadNode (location: (1,7)-(1,12)) + │ │ │ │ │ └── name: :Class + │ │ │ │ ├── call_operator_loc: (1,12)-(1,13) = "." + │ │ │ │ ├── name: :new + │ │ │ │ ├── message_loc: (1,13)-(1,16) = "new" + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── arguments: ∅ + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── block: + │ │ │ │ @ BlockNode (location: (1,17)-(4,4)) + │ │ │ │ ├── locals: [] + │ │ │ │ ├── locals_body_index: 0 + │ │ │ │ ├── parameters: ∅ + │ │ │ │ ├── body: + │ │ │ │ │ @ StatementsNode (location: (2,0)-(3,3)) + │ │ │ │ │ └── body: (length: 1) + │ │ │ │ │ └── @ DefNode (location: (2,0)-(3,3)) + │ │ │ │ │ ├── name: :initialize + │ │ │ │ │ ├── name_loc: (2,4)-(2,14) = "initialize" + │ │ │ │ │ ├── receiver: ∅ + │ │ │ │ │ ├── parameters: ∅ + │ │ │ │ │ ├── body: ∅ + │ │ │ │ │ ├── locals: [] + │ │ │ │ │ ├── locals_body_index: 0 + │ │ │ │ │ ├── def_keyword_loc: (2,0)-(2,3) = "def" + │ │ │ │ │ ├── operator_loc: ∅ + │ │ │ │ │ ├── lparen_loc: ∅ + │ │ │ │ │ ├── rparen_loc: ∅ + │ │ │ │ │ ├── equal_loc: ∅ + │ │ │ │ │ └── end_keyword_loc: (3,0)-(3,3) = "end" + │ │ │ │ ├── opening_loc: (1,17)-(1,19) = "do" + │ │ │ │ └── closing_loc: (4,1)-(4,4) = "end" + │ │ │ ├── opening_loc: (1,6)-(1,7) = "(" + │ │ │ └── closing_loc: (4,4)-(4,5) = ")" + │ │ ├── call_operator_loc: (4,5)-(4,6) = "." + │ │ ├── name: :new + │ │ ├── message_loc: (4,6)-(4,9) = "new" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ └── @ KeywordHashNode (location: (4,11)-(4,28)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (4,11)-(4,28)) + │ ├── key: + │ │ @ SymbolNode (location: (4,11)-(4,14)) + │ │ ├── opening_loc: (4,11)-(4,12) = ":" + │ │ ├── value_loc: (4,12)-(4,14) = "at" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "at" + │ ├── value: + │ │ @ StringNode (location: (4,18)-(4,28)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (4,18)-(4,19) = "'" + │ │ ├── content_loc: (4,19)-(4,27) = "endpoint" + │ │ ├── closing_loc: (4,27)-(4,28) = "'" + │ │ └── unescaped: "endpoint" + │ └── operator_loc: (4,15)-(4,17) = "=>" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_and.txt b/test/prism/snapshots/seattlerb/bug_and.txt index bc52f7bdc9..3daf505e5f 100644 --- a/test/prism/snapshots/seattlerb/bug_and.txt +++ b/test/prism/snapshots/seattlerb/bug_and.txt @@ -14,8 +14,8 @@ │ @ TrueNode (location: (4,0)-(4,4)) ├── right: │ @ ArrayNode (location: (4,9)-(4,11)) + │ ├── flags: ∅ │ ├── elements: (length: 0) │ ├── opening_loc: (4,9)-(4,10) = "[" - │ ├── closing_loc: (4,10)-(4,11) = "]" - │ └── flags: ∅ + │ └── closing_loc: (4,10)-(4,11) = "]" └── operator_loc: (4,5)-(4,8) = "and" diff --git a/test/prism/snapshots/seattlerb/bug_args__19.txt b/test/prism/snapshots/seattlerb/bug_args__19.txt index 7b102791c3..e2617df20f 100644 --- a/test/prism/snapshots/seattlerb/bug_args__19.txt +++ b/test/prism/snapshots/seattlerb/bug_args__19.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,47 +12,46 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,16)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,11)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) - │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) - │ │ │ │ │ │ └── name: :a - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: ∅ - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (1,13)-(1,14)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (1,13)-(1,14)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :d - │ │ ├── message_loc: (1,13)-(1,14) = "d" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,15)-(1,16) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,16)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,11)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) + │ │ │ ├── lefts: (length: 2) + │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) + │ │ │ │ │ └── name: :a + │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: + │ @ StatementsNode (location: (1,13)-(1,14)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (1,13)-(1,14)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :d + │ ├── message_loc: (1,13)-(1,14) = "d" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,15)-(1,16) = "}" diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn.txt b/test/prism/snapshots/seattlerb/bug_args_masgn.txt index 7ebbef045c..3ee3dd05ec 100644 --- a/test/prism/snapshots/seattlerb/bug_args_masgn.txt +++ b/test/prism/snapshots/seattlerb/bug_args_masgn.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,37 +12,36 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,11)) - │ │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) - │ │ │ │ │ │ │ └── name: :a - │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ │ └── name: :b - │ │ │ │ │ ├── rest: ∅ - │ │ │ │ │ ├── rights: (length: 0) - │ │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" - │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ └── name: :c - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,11)) + │ │ │ │ ├── lefts: (length: 2) + │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) + │ │ │ │ │ │ └── name: :a + │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ │ └── name: :b + │ │ │ │ ├── rest: ∅ + │ │ │ │ ├── rights: (length: 0) + │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" + │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ └── name: :c + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn2.txt b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt index 349f3694df..3de9e976d1 100644 --- a/test/prism/snapshots/seattlerb/bug_args_masgn2.txt +++ b/test/prism/snapshots/seattlerb/bug_args_masgn2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,22)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,22)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,45 +12,44 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,22)) - │ ├── locals: [:a, :b, :c, :d] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,20)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,19)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,16)) - │ │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12)) - │ │ │ │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8)) - │ │ │ │ │ │ │ │ │ └── name: :a - │ │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11)) - │ │ │ │ │ │ │ │ └── name: :b - │ │ │ │ │ │ │ ├── rest: ∅ - │ │ │ │ │ │ │ ├── rights: (length: 0) - │ │ │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "(" - │ │ │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" - │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) - │ │ │ │ │ │ └── name: :c - │ │ │ │ │ ├── rest: ∅ - │ │ │ │ │ ├── rights: (length: 0) - │ │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ │ └── rparen_loc: (1,15)-(1,16) = ")" - │ │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19)) - │ │ │ │ └── name: :d - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,19)-(1,20) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,21)-(1,22) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,22)) + ├── locals: [:a, :b, :c, :d] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,20)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,19)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ MultiTargetNode (location: (1,5)-(1,16)) + │ │ │ │ ├── lefts: (length: 2) + │ │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12)) + │ │ │ │ │ │ ├── lefts: (length: 2) + │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8)) + │ │ │ │ │ │ │ │ └── name: :a + │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ │ │ │ │ └── name: :b + │ │ │ │ │ │ ├── rest: ∅ + │ │ │ │ │ │ ├── rights: (length: 0) + │ │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "(" + │ │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" + │ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) + │ │ │ │ │ └── name: :c + │ │ │ │ ├── rest: ∅ + │ │ │ │ ├── rights: (length: 0) + │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ │ └── rparen_loc: (1,15)-(1,16) = ")" + │ │ │ └── @ RequiredParameterNode (location: (1,18)-(1,19)) + │ │ │ └── name: :d + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,19)-(1,20) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,21)-(1,22) = "}" diff --git a/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt b/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt index 4f88bea49b..4278d58a00 100644 --- a/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt +++ b/test/prism/snapshots/seattlerb/bug_args_masgn_outer_parens__19.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,19)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,19)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,43 +12,42 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,19)) - │ ├── locals: [:k, :v, :i] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,17)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,16)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,16)) - │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12)) - │ │ │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8)) - │ │ │ │ │ │ │ │ └── name: :k - │ │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11)) - │ │ │ │ │ │ │ └── name: :v - │ │ │ │ │ │ ├── rest: ∅ - │ │ │ │ │ │ ├── rights: (length: 0) - │ │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "(" - │ │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) - │ │ │ │ │ └── name: :i - │ │ │ │ ├── rest: ∅ - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,15)-(1,16) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,16)-(1,17) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,18)-(1,19) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,19)) + ├── locals: [:k, :v, :i] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,17)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,16)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,16)) + │ │ │ ├── lefts: (length: 2) + │ │ │ │ ├── @ MultiTargetNode (location: (1,6)-(1,12)) + │ │ │ │ │ ├── lefts: (length: 2) + │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,7)-(1,8)) + │ │ │ │ │ │ │ └── name: :k + │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ │ │ │ └── name: :v + │ │ │ │ │ ├── rest: ∅ + │ │ │ │ │ ├── rights: (length: 0) + │ │ │ │ │ ├── lparen_loc: (1,6)-(1,7) = "(" + │ │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" + │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) + │ │ │ │ └── name: :i + │ │ │ ├── rest: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,15)-(1,16) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,16)-(1,17) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,18)-(1,19) = "}" diff --git a/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt index 4258931735..5056fe6d70 100644 --- a/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt +++ b/test/prism/snapshots/seattlerb/bug_call_arglist_parens.txt @@ -12,6 +12,7 @@ │ │ @ StatementsNode (location: (2,8)-(2,17)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (2,8)-(2,17)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :g @@ -19,21 +20,20 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (2,10)-(2,17)) - │ │ │ ├── arguments: (length: 2) - │ │ │ │ ├── @ ParenthesesNode (location: (2,10)-(2,14)) - │ │ │ │ │ ├── body: - │ │ │ │ │ │ @ StatementsNode (location: (2,12)-(2,13)) - │ │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ │ └── @ IntegerNode (location: (2,12)-(2,13)) - │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ ├── opening_loc: (2,10)-(2,11) = "(" - │ │ │ │ │ └── closing_loc: (2,13)-(2,14) = ")" - │ │ │ │ └── @ IntegerNode (location: (2,16)-(2,17)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 2) + │ │ │ ├── @ ParenthesesNode (location: (2,10)-(2,14)) + │ │ │ │ ├── body: + │ │ │ │ │ @ StatementsNode (location: (2,12)-(2,13)) + │ │ │ │ │ └── body: (length: 1) + │ │ │ │ │ └── @ IntegerNode (location: (2,12)-(2,13)) + │ │ │ │ │ └── flags: decimal + │ │ │ │ ├── opening_loc: (2,10)-(2,11) = "(" + │ │ │ │ └── closing_loc: (2,13)-(2,14) = ")" + │ │ │ └── @ IntegerNode (location: (2,16)-(2,17)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── locals: [] │ ├── locals_body_index: 0 │ ├── def_keyword_loc: (1,6)-(1,9) = "def" @@ -51,6 +51,7 @@ │ │ @ StatementsNode (location: (7,8)-(7,16)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (7,8)-(7,16)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :g @@ -58,21 +59,20 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (7,10)-(7,16)) - │ │ │ ├── arguments: (length: 2) - │ │ │ │ ├── @ ParenthesesNode (location: (7,10)-(7,13)) - │ │ │ │ │ ├── body: - │ │ │ │ │ │ @ StatementsNode (location: (7,11)-(7,12)) - │ │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ │ └── @ IntegerNode (location: (7,11)-(7,12)) - │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ ├── opening_loc: (7,10)-(7,11) = "(" - │ │ │ │ │ └── closing_loc: (7,12)-(7,13) = ")" - │ │ │ │ └── @ IntegerNode (location: (7,15)-(7,16)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 2) + │ │ │ ├── @ ParenthesesNode (location: (7,10)-(7,13)) + │ │ │ │ ├── body: + │ │ │ │ │ @ StatementsNode (location: (7,11)-(7,12)) + │ │ │ │ │ └── body: (length: 1) + │ │ │ │ │ └── @ IntegerNode (location: (7,11)-(7,12)) + │ │ │ │ │ └── flags: decimal + │ │ │ │ ├── opening_loc: (7,10)-(7,11) = "(" + │ │ │ │ └── closing_loc: (7,12)-(7,13) = ")" + │ │ │ └── @ IntegerNode (location: (7,15)-(7,16)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── locals: [] │ ├── locals_body_index: 0 │ ├── def_keyword_loc: (6,6)-(6,9) = "def" @@ -82,6 +82,7 @@ │ ├── equal_loc: ∅ │ └── end_keyword_loc: (8,6)-(8,9) = "end" └── @ CallNode (location: (11,0)-(11,9)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :g @@ -89,18 +90,17 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (11,2)-(11,9)) - │ ├── arguments: (length: 2) - │ │ ├── @ ParenthesesNode (location: (11,2)-(11,6)) - │ │ │ ├── body: - │ │ │ │ @ StatementsNode (location: (11,4)-(11,5)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (11,4)-(11,5)) - │ │ │ │ └── flags: decimal - │ │ │ ├── opening_loc: (11,2)-(11,3) = "(" - │ │ │ └── closing_loc: (11,5)-(11,6) = ")" - │ │ └── @ IntegerNode (location: (11,8)-(11,9)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ ParenthesesNode (location: (11,2)-(11,6)) + │ │ ├── body: + │ │ │ @ StatementsNode (location: (11,4)-(11,5)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ IntegerNode (location: (11,4)-(11,5)) + │ │ │ └── flags: decimal + │ │ ├── opening_loc: (11,2)-(11,3) = "(" + │ │ └── closing_loc: (11,5)-(11,6) = ")" + │ └── @ IntegerNode (location: (11,8)-(11,9)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt b/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt index ac948bc6c9..6d3b11b9af 100644 --- a/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt +++ b/test/prism/snapshots/seattlerb/bug_case_when_regexp.txt @@ -15,11 +15,11 @@ │ ├── keyword_loc: (1,9)-(1,13) = "when" │ ├── conditions: (length: 1) │ │ └── @ RegularExpressionNode (location: (1,14)-(1,17)) + │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,14)-(1,15) = "/" │ │ ├── content_loc: (1,15)-(1,16) = "x" │ │ ├── closing_loc: (1,16)-(1,17) = "/" - │ │ ├── unescaped: "x" - │ │ └── flags: ∅ + │ │ └── unescaped: "x" │ └── statements: ∅ ├── consequent: ∅ ├── case_keyword_loc: (1,0)-(1,4) = "case" diff --git a/test/prism/snapshots/seattlerb/bug_comma.txt b/test/prism/snapshots/seattlerb/bug_comma.txt index 3fca88d860..42815e0dfe 100644 --- a/test/prism/snapshots/seattlerb/bug_comma.txt +++ b/test/prism/snapshots/seattlerb/bug_comma.txt @@ -7,6 +7,7 @@ ├── if_keyword_loc: (1,0)-(1,2) = "if" ├── predicate: │ @ CallNode (location: (1,3)-(1,15)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :test @@ -14,27 +15,26 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,8)-(1,15)) - │ │ ├── arguments: (length: 2) - │ │ │ ├── @ StringNode (location: (1,8)-(1,10)) - │ │ │ │ ├── flags: ∅ - │ │ │ │ ├── opening_loc: (1,8)-(1,9) = "?" - │ │ │ │ ├── content_loc: (1,9)-(1,10) = "d" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "d" - │ │ │ └── @ CallNode (location: (1,12)-(1,15)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :dir - │ │ │ ├── message_loc: (1,12)-(1,15) = "dir" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 2) + │ │ ├── @ StringNode (location: (1,8)-(1,10)) + │ │ │ ├── flags: ∅ + │ │ │ ├── opening_loc: (1,8)-(1,9) = "?" + │ │ │ ├── content_loc: (1,9)-(1,10) = "d" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "d" + │ │ └── @ CallNode (location: (1,12)-(1,15)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :dir + │ │ ├── message_loc: (1,12)-(1,15) = "dir" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── then_keyword_loc: (1,16)-(1,20) = "then" ├── statements: ∅ ├── consequent: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_cond_pct.txt b/test/prism/snapshots/seattlerb/bug_cond_pct.txt index bb07f009aa..b5a397f4f5 100644 --- a/test/prism/snapshots/seattlerb/bug_cond_pct.txt +++ b/test/prism/snapshots/seattlerb/bug_cond_pct.txt @@ -10,11 +10,11 @@ │ ├── keyword_loc: (1,6)-(1,10) = "when" │ ├── conditions: (length: 1) │ │ └── @ RegularExpressionNode (location: (1,11)-(1,23)) + │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,11)-(1,14) = "%r%" │ │ ├── content_loc: (1,14)-(1,22) = "blahblah" │ │ ├── closing_loc: (1,22)-(1,23) = "%" - │ │ ├── unescaped: "blahblah" - │ │ └── flags: ∅ + │ │ └── unescaped: "blahblah" │ └── statements: ∅ ├── consequent: ∅ ├── case_keyword_loc: (1,0)-(1,4) = "case" diff --git a/test/prism/snapshots/seattlerb/bug_hash_args.txt b/test/prism/snapshots/seattlerb/bug_hash_args.txt index 32d9dc91a5..96d0adde24 100644 --- a/test/prism/snapshots/seattlerb/bug_hash_args.txt +++ b/test/prism/snapshots/seattlerb/bug_hash_args.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,19)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,19)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :foo @@ -11,25 +12,24 @@ ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,18)) - │ ├── arguments: (length: 2) - │ │ ├── @ SymbolNode (location: (1,4)-(1,8)) - │ │ │ ├── opening_loc: (1,4)-(1,5) = ":" - │ │ │ ├── value_loc: (1,5)-(1,8) = "bar" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "bar" - │ │ └── @ KeywordHashNode (location: (1,10)-(1,18)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,10)-(1,18)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,10)-(1,14)) - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (1,10)-(1,13) = "baz" - │ │ │ ├── closing_loc: (1,13)-(1,14) = ":" - │ │ │ └── unescaped: "baz" - │ │ ├── value: - │ │ │ @ NilNode (location: (1,15)-(1,18)) - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ SymbolNode (location: (1,4)-(1,8)) + │ │ ├── opening_loc: (1,4)-(1,5) = ":" + │ │ ├── value_loc: (1,5)-(1,8) = "bar" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "bar" + │ └── @ KeywordHashNode (location: (1,10)-(1,18)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,10)-(1,18)) + │ ├── key: + │ │ @ SymbolNode (location: (1,10)-(1,14)) + │ │ ├── opening_loc: ∅ + │ │ ├── value_loc: (1,10)-(1,13) = "baz" + │ │ ├── closing_loc: (1,13)-(1,14) = ":" + │ │ └── unescaped: "baz" + │ ├── value: + │ │ @ NilNode (location: (1,15)-(1,18)) + │ └── operator_loc: ∅ ├── closing_loc: (1,18)-(1,19) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt index 1cea78d46f..b1404826ec 100644 --- a/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt +++ b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,20)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,20)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :foo @@ -11,25 +12,24 @@ ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,18)) - │ ├── arguments: (length: 2) - │ │ ├── @ SymbolNode (location: (1,4)-(1,8)) - │ │ │ ├── opening_loc: (1,4)-(1,5) = ":" - │ │ │ ├── value_loc: (1,5)-(1,8) = "bar" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "bar" - │ │ └── @ KeywordHashNode (location: (1,10)-(1,18)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,10)-(1,18)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,10)-(1,14)) - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (1,10)-(1,13) = "baz" - │ │ │ ├── closing_loc: (1,13)-(1,14) = ":" - │ │ │ └── unescaped: "baz" - │ │ ├── value: - │ │ │ @ NilNode (location: (1,15)-(1,18)) - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ SymbolNode (location: (1,4)-(1,8)) + │ │ ├── opening_loc: (1,4)-(1,5) = ":" + │ │ ├── value_loc: (1,5)-(1,8) = "bar" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "bar" + │ └── @ KeywordHashNode (location: (1,10)-(1,18)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,10)-(1,18)) + │ ├── key: + │ │ @ SymbolNode (location: (1,10)-(1,14)) + │ │ ├── opening_loc: ∅ + │ │ ├── value_loc: (1,10)-(1,13) = "baz" + │ │ ├── closing_loc: (1,13)-(1,14) = ":" + │ │ └── unescaped: "baz" + │ ├── value: + │ │ @ NilNode (location: (1,15)-(1,18)) + │ └── operator_loc: ∅ ├── closing_loc: (1,19)-(1,20) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt b/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt index 30c05e8960..433fb02411 100644 --- a/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt +++ b/test/prism/snapshots/seattlerb/bug_hash_interp_array.txt @@ -18,9 +18,9 @@ │ │ └── closing_loc: (1,6)-(1,8) = "\":" │ ├── value: │ │ @ ArrayNode (location: (1,9)-(1,11)) + │ │ ├── flags: ∅ │ │ ├── elements: (length: 0) │ │ ├── opening_loc: (1,9)-(1,10) = "[" - │ │ ├── closing_loc: (1,10)-(1,11) = "]" - │ │ └── flags: ∅ + │ │ └── closing_loc: (1,10)-(1,11) = "]" │ └── operator_loc: ∅ └── closing_loc: (1,12)-(1,13) = "}" diff --git a/test/prism/snapshots/seattlerb/bug_masgn_right.txt b/test/prism/snapshots/seattlerb/bug_masgn_right.txt index 5996d1996a..194b01f281 100644 --- a/test/prism/snapshots/seattlerb/bug_masgn_right.txt +++ b/test/prism/snapshots/seattlerb/bug_masgn_right.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,37 +12,36 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14)) - │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ │ └── name: :b - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── rest: ∅ - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14)) + │ │ │ ├── lefts: (length: 2) + │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ │ └── name: :b + │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) + │ │ │ │ └── name: :c + │ │ │ ├── rest: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/bug_not_parens.txt b/test/prism/snapshots/seattlerb/bug_not_parens.txt index f5328a6eb1..c5157a0ed9 100644 --- a/test/prism/snapshots/seattlerb/bug_not_parens.txt +++ b/test/prism/snapshots/seattlerb/bug_not_parens.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,4)-(1,5)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :! ├── message_loc: (1,0)-(1,3) = "not" ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: ∅ ├── closing_loc: (1,5)-(1,6) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt b/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt index e8504cc967..b31d4a19b6 100644 --- a/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt +++ b/test/prism/snapshots/seattlerb/bug_op_asgn_rescue.txt @@ -10,6 +10,7 @@ │ @ RescueModifierNode (location: (1,6)-(1,18)) │ ├── expression: │ │ @ CallNode (location: (1,6)-(1,7)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -17,8 +18,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── keyword_loc: (1,8)-(1,14) = "rescue" │ └── rescue_expression: │ @ NilNode (location: (1,15)-(1,18)) diff --git a/test/prism/snapshots/seattlerb/call_and.txt b/test/prism/snapshots/seattlerb/call_and.txt index 5ff2ef31f1..8c6bf2f2e3 100644 --- a/test/prism/snapshots/seattlerb/call_and.txt +++ b/test/prism/snapshots/seattlerb/call_and.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_arg_assoc.txt b/test/prism/snapshots/seattlerb/call_arg_assoc.txt index 1eeb319630..4694b43045 100644 --- a/test/prism/snapshots/seattlerb/call_arg_assoc.txt +++ b/test/prism/snapshots/seattlerb/call_arg_assoc.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,10)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,10)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,20 +12,19 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,9)) - │ ├── arguments: (length: 2) - │ │ ├── @ IntegerNode (location: (1,2)-(1,3)) - │ │ │ └── flags: decimal - │ │ └── @ KeywordHashNode (location: (1,5)-(1,9)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,5)-(1,9)) - │ │ ├── key: - │ │ │ @ IntegerNode (location: (1,5)-(1,6)) - │ │ │ └── flags: decimal - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,8)-(1,9)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,6)-(1,8) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ IntegerNode (location: (1,2)-(1,3)) + │ │ └── flags: decimal + │ └── @ KeywordHashNode (location: (1,5)-(1,9)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,5)-(1,9)) + │ ├── key: + │ │ @ IntegerNode (location: (1,5)-(1,6)) + │ │ └── flags: decimal + │ ├── value: + │ │ @ IntegerNode (location: (1,8)-(1,9)) + │ │ └── flags: decimal + │ └── operator_loc: (1,6)-(1,8) = "=>" ├── closing_loc: (1,9)-(1,10) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt b/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt index ca96559020..12a9bbfe38 100644 --- a/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt +++ b/test/prism/snapshots/seattlerb/call_arg_assoc_kwsplat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,28 +12,27 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,15)) - │ ├── arguments: (length: 2) - │ │ ├── @ IntegerNode (location: (1,2)-(1,3)) - │ │ │ └── flags: decimal - │ │ └── @ KeywordHashNode (location: (1,5)-(1,15)) - │ │ └── elements: (length: 2) - │ │ ├── @ AssocNode (location: (1,5)-(1,10)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (1,5)-(1,8)) - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── value_loc: (1,5)-(1,7) = "kw" - │ │ │ │ ├── closing_loc: (1,7)-(1,8) = ":" - │ │ │ │ └── unescaped: "kw" - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,10)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: ∅ - │ │ └── @ AssocSplatNode (location: (1,12)-(1,15)) - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,14)-(1,15)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,12)-(1,14) = "**" - │ └── flags: contains_keyword_splat + │ ├── flags: contains_keyword_splat + │ └── arguments: (length: 2) + │ ├── @ IntegerNode (location: (1,2)-(1,3)) + │ │ └── flags: decimal + │ └── @ KeywordHashNode (location: (1,5)-(1,15)) + │ └── elements: (length: 2) + │ ├── @ AssocNode (location: (1,5)-(1,10)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (1,5)-(1,8)) + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── value_loc: (1,5)-(1,7) = "kw" + │ │ │ ├── closing_loc: (1,7)-(1,8) = ":" + │ │ │ └── unescaped: "kw" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,10)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: ∅ + │ └── @ AssocSplatNode (location: (1,12)-(1,15)) + │ ├── value: + │ │ @ IntegerNode (location: (1,14)-(1,15)) + │ │ └── flags: decimal + │ └── operator_loc: (1,12)-(1,14) = "**" ├── closing_loc: (1,15)-(1,16) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt b/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt index 1d3c7c5c5c..da8d8b709b 100644 --- a/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt +++ b/test/prism/snapshots/seattlerb/call_arg_kwsplat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,9)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,25 +12,24 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,8)) - │ ├── arguments: (length: 2) - │ │ ├── @ CallNode (location: (1,2)-(1,3)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :b - │ │ │ ├── message_loc: (1,2)-(1,3) = "b" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── @ KeywordHashNode (location: (1,5)-(1,8)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocSplatNode (location: (1,5)-(1,8)) - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,7)-(1,8)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,5)-(1,7) = "**" - │ └── flags: contains_keyword_splat + │ ├── flags: contains_keyword_splat + │ └── arguments: (length: 2) + │ ├── @ CallNode (location: (1,2)-(1,3)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :b + │ │ ├── message_loc: (1,2)-(1,3) = "b" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ └── @ KeywordHashNode (location: (1,5)-(1,8)) + │ └── elements: (length: 1) + │ └── @ AssocSplatNode (location: (1,5)-(1,8)) + │ ├── value: + │ │ @ IntegerNode (location: (1,7)-(1,8)) + │ │ └── flags: decimal + │ └── operator_loc: (1,5)-(1,7) = "**" ├── closing_loc: (1,8)-(1,9) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt index 7bbc67bb54..d20e11bf6b 100644 --- a/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt +++ b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,8)) └── body: (length: 3) ├── @ CallNode (location: (1,0)-(1,11)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :x @@ -11,40 +12,40 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,11)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ KeywordHashNode (location: (1,2)-(1,11)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocNode (location: (1,2)-(1,11)) - │ │ │ ├── key: - │ │ │ │ @ InterpolatedSymbolNode (location: (1,2)-(1,9)) - │ │ │ │ ├── opening_loc: (1,2)-(1,3) = "\"" - │ │ │ │ ├── parts: (length: 1) - │ │ │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7)) - │ │ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{" - │ │ │ │ │ ├── statements: - │ │ │ │ │ │ @ StatementsNode (location: (1,5)-(1,6)) - │ │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ │ └── @ CallNode (location: (1,5)-(1,6)) - │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ │ ├── name: :k - │ │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "k" - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ │ └── flags: variable_call - │ │ │ │ │ └── closing_loc: (1,6)-(1,7) = "}" - │ │ │ │ └── closing_loc: (1,7)-(1,9) = "\":" - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (1,2)-(1,11)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (1,2)-(1,11)) + │ │ ├── key: + │ │ │ @ InterpolatedSymbolNode (location: (1,2)-(1,9)) + │ │ │ ├── opening_loc: (1,2)-(1,3) = "\"" + │ │ │ ├── parts: (length: 1) + │ │ │ │ └── @ EmbeddedStatementsNode (location: (1,3)-(1,7)) + │ │ │ │ ├── opening_loc: (1,3)-(1,5) = "\#{" + │ │ │ │ ├── statements: + │ │ │ │ │ @ StatementsNode (location: (1,5)-(1,6)) + │ │ │ │ │ └── body: (length: 1) + │ │ │ │ │ └── @ CallNode (location: (1,5)-(1,6)) + │ │ │ │ │ ├── flags: variable_call + │ │ │ │ │ ├── receiver: ∅ + │ │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ │ ├── name: :k + │ │ │ │ │ ├── message_loc: (1,5)-(1,6) = "k" + │ │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ │ ├── arguments: ∅ + │ │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ │ └── block: ∅ + │ │ │ │ └── closing_loc: (1,6)-(1,7) = "}" + │ │ │ └── closing_loc: (1,7)-(1,9) = "\":" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,11)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── @ CallNode (location: (3,0)-(3,8)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :x @@ -52,25 +53,25 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (3,2)-(3,8)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ KeywordHashNode (location: (3,2)-(3,8)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocNode (location: (3,2)-(3,8)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (3,2)-(3,6)) - │ │ │ │ ├── opening_loc: (3,2)-(3,3) = "\"" - │ │ │ │ ├── value_loc: (3,3)-(3,4) = "k" - │ │ │ │ ├── closing_loc: (3,4)-(3,6) = "\":" - │ │ │ │ └── unescaped: "k" - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (3,6)-(3,8)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (3,2)-(3,8)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (3,2)-(3,8)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (3,2)-(3,6)) + │ │ │ ├── opening_loc: (3,2)-(3,3) = "\"" + │ │ │ ├── value_loc: (3,3)-(3,4) = "k" + │ │ │ ├── closing_loc: (3,4)-(3,6) = "\":" + │ │ │ └── unescaped: "k" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (3,6)-(3,8)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (5,0)-(5,8)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -78,21 +79,20 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (5,2)-(5,8)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (5,2)-(5,8)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (5,2)-(5,8)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (5,2)-(5,6)) - │ │ │ ├── opening_loc: (5,2)-(5,3) = "'" - │ │ │ ├── value_loc: (5,3)-(5,4) = "k" - │ │ │ ├── closing_loc: (5,4)-(5,6) = "':" - │ │ │ └── unescaped: "k" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (5,6)-(5,8)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (5,2)-(5,8)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (5,2)-(5,8)) + │ ├── key: + │ │ @ SymbolNode (location: (5,2)-(5,6)) + │ │ ├── opening_loc: (5,2)-(5,3) = "'" + │ │ ├── value_loc: (5,3)-(5,4) = "k" + │ │ ├── closing_loc: (5,4)-(5,6) = "':" + │ │ └── unescaped: "k" + │ ├── value: + │ │ @ IntegerNode (location: (5,6)-(5,8)) + │ │ └── flags: decimal + │ └── operator_loc: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt index a248805777..b27cd84ba0 100644 --- a/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt +++ b/test/prism/snapshots/seattlerb/call_args_assoc_trailing_comma.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,20 +12,19 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,9)) - │ ├── arguments: (length: 2) - │ │ ├── @ IntegerNode (location: (1,2)-(1,3)) - │ │ │ └── flags: decimal - │ │ └── @ KeywordHashNode (location: (1,5)-(1,9)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,5)-(1,9)) - │ │ ├── key: - │ │ │ @ IntegerNode (location: (1,5)-(1,6)) - │ │ │ └── flags: decimal - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,8)-(1,9)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,6)-(1,8) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ IntegerNode (location: (1,2)-(1,3)) + │ │ └── flags: decimal + │ └── @ KeywordHashNode (location: (1,5)-(1,9)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,5)-(1,9)) + │ ├── key: + │ │ @ IntegerNode (location: (1,5)-(1,6)) + │ │ └── flags: decimal + │ ├── value: + │ │ @ IntegerNode (location: (1,8)-(1,9)) + │ │ └── flags: decimal + │ └── operator_loc: (1,6)-(1,8) = "=>" ├── closing_loc: (1,10)-(1,11) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_args_command.txt b/test/prism/snapshots/seattlerb/call_args_command.txt index 2b9353e755..c371dda3f4 100644 --- a/test/prism/snapshots/seattlerb/call_args_command.txt +++ b/test/prism/snapshots/seattlerb/call_args_command.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,9)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,41 +15,39 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :b ├── message_loc: (1,2)-(1,3) = "b" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,9)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,4)-(1,9)) - │ │ ├── receiver: - │ │ │ @ CallNode (location: (1,4)-(1,5)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :c - │ │ │ ├── message_loc: (1,4)-(1,5) = "c" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ ├── call_operator_loc: (1,5)-(1,6) = "." - │ │ ├── name: :d - │ │ ├── message_loc: (1,6)-(1,7) = "d" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (1,8)-(1,9)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (1,8)-(1,9)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,4)-(1,9)) + │ ├── flags: ∅ + │ ├── receiver: + │ │ @ CallNode (location: (1,4)-(1,5)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :c + │ │ ├── message_loc: (1,4)-(1,5) = "c" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── call_operator_loc: (1,5)-(1,6) = "." + │ ├── name: :d + │ ├── message_loc: (1,6)-(1,7) = "d" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (1,8)-(1,9)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,8)-(1,9)) + │ │ └── flags: decimal + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_array_arg.txt b/test/prism/snapshots/seattlerb/call_array_arg.txt index 01c16c0091..d0ccd3d7b0 100644 --- a/test/prism/snapshots/seattlerb/call_array_arg.txt +++ b/test/prism/snapshots/seattlerb/call_array_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,23 +14,22 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,13)) - │ ├── arguments: (length: 1) - │ │ └── @ ArrayNode (location: (1,5)-(1,13)) - │ │ ├── elements: (length: 2) - │ │ │ ├── @ SymbolNode (location: (1,6)-(1,8)) - │ │ │ │ ├── opening_loc: (1,6)-(1,7) = ":" - │ │ │ │ ├── value_loc: (1,7)-(1,8) = "b" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "b" - │ │ │ └── @ SymbolNode (location: (1,10)-(1,12)) - │ │ │ ├── opening_loc: (1,10)-(1,11) = ":" - │ │ │ ├── value_loc: (1,11)-(1,12) = "c" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "c" - │ │ ├── opening_loc: (1,5)-(1,6) = "[" - │ │ ├── closing_loc: (1,12)-(1,13) = "]" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ArrayNode (location: (1,5)-(1,13)) + │ ├── flags: ∅ + │ ├── elements: (length: 2) + │ │ ├── @ SymbolNode (location: (1,6)-(1,8)) + │ │ │ ├── opening_loc: (1,6)-(1,7) = ":" + │ │ │ ├── value_loc: (1,7)-(1,8) = "b" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "b" + │ │ └── @ SymbolNode (location: (1,10)-(1,12)) + │ │ ├── opening_loc: (1,10)-(1,11) = ":" + │ │ ├── value_loc: (1,11)-(1,12) = "c" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "c" + │ ├── opening_loc: (1,5)-(1,6) = "[" + │ └── closing_loc: (1,12)-(1,13) = "]" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_array_block_call.txt b/test/prism/snapshots/seattlerb/call_array_block_call.txt index 65daaf7287..c75ddc8272 100644 --- a/test/prism/snapshots/seattlerb/call_array_block_call.txt +++ b/test/prism/snapshots/seattlerb/call_array_block_call.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,19)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,19)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,19)) - │ ├── arguments: (length: 1) - │ │ └── @ ArrayNode (location: (1,2)-(1,19)) - │ │ ├── elements: (length: 2) - │ │ │ ├── @ NilNode (location: (1,4)-(1,7)) - │ │ │ └── @ CallNode (location: (1,9)-(1,17)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :b - │ │ │ ├── message_loc: (1,9)-(1,10) = "b" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: - │ │ │ │ @ BlockNode (location: (1,11)-(1,17)) - │ │ │ │ ├── locals: [] - │ │ │ │ ├── locals_body_index: 0 - │ │ │ │ ├── parameters: ∅ - │ │ │ │ ├── body: ∅ - │ │ │ │ ├── opening_loc: (1,11)-(1,13) = "do" - │ │ │ │ └── closing_loc: (1,14)-(1,17) = "end" - │ │ │ └── flags: ∅ - │ │ ├── opening_loc: (1,2)-(1,3) = "[" - │ │ ├── closing_loc: (1,18)-(1,19) = "]" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ArrayNode (location: (1,2)-(1,19)) + │ ├── flags: ∅ + │ ├── elements: (length: 2) + │ │ ├── @ NilNode (location: (1,4)-(1,7)) + │ │ └── @ CallNode (location: (1,9)-(1,17)) + │ │ ├── flags: ∅ + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :b + │ │ ├── message_loc: (1,9)-(1,10) = "b" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: + │ │ @ BlockNode (location: (1,11)-(1,17)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── parameters: ∅ + │ │ ├── body: ∅ + │ │ ├── opening_loc: (1,11)-(1,13) = "do" + │ │ └── closing_loc: (1,14)-(1,17) = "end" + │ ├── opening_loc: (1,2)-(1,3) = "[" + │ └── closing_loc: (1,18)-(1,19) = "]" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt index 291cdc87ea..04900f9b39 100644 --- a/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt +++ b/test/prism/snapshots/seattlerb/call_array_lambda_block_call.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(2,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(2,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,33 +12,32 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,11)) - │ ├── arguments: (length: 1) - │ │ └── @ ArrayNode (location: (1,2)-(1,11)) - │ │ ├── elements: (length: 1) - │ │ │ └── @ LambdaNode (location: (1,3)-(1,10)) - │ │ │ ├── locals: [] - │ │ │ ├── locals_body_index: 0 - │ │ │ ├── operator_loc: (1,3)-(1,5) = "->" - │ │ │ ├── opening_loc: (1,8)-(1,9) = "{" - │ │ │ ├── closing_loc: (1,9)-(1,10) = "}" - │ │ │ ├── parameters: - │ │ │ │ @ BlockParametersNode (location: (1,5)-(1,7)) - │ │ │ │ ├── parameters: ∅ - │ │ │ │ ├── locals: (length: 0) - │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── closing_loc: (1,6)-(1,7) = ")" - │ │ │ └── body: ∅ - │ │ ├── opening_loc: (1,2)-(1,3) = "[" - │ │ ├── closing_loc: (1,10)-(1,11) = "]" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ArrayNode (location: (1,2)-(1,11)) + │ ├── flags: ∅ + │ ├── elements: (length: 1) + │ │ └── @ LambdaNode (location: (1,3)-(1,10)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── operator_loc: (1,3)-(1,5) = "->" + │ │ ├── opening_loc: (1,8)-(1,9) = "{" + │ │ ├── closing_loc: (1,9)-(1,10) = "}" + │ │ ├── parameters: + │ │ │ @ BlockParametersNode (location: (1,5)-(1,7)) + │ │ │ ├── parameters: ∅ + │ │ │ ├── locals: (length: 0) + │ │ │ ├── opening_loc: (1,5)-(1,6) = "(" + │ │ │ └── closing_loc: (1,6)-(1,7) = ")" + │ │ └── body: ∅ + │ ├── opening_loc: (1,2)-(1,3) = "[" + │ └── closing_loc: (1,10)-(1,11) = "]" ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,12)-(2,3)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: ∅ - │ ├── opening_loc: (1,12)-(1,14) = "do" - │ └── closing_loc: (2,0)-(2,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,12)-(2,3)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: ∅ + ├── opening_loc: (1,12)-(1,14) = "do" + └── closing_loc: (2,0)-(2,3) = "end" diff --git a/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt index cecdfbeaec..f13625e87f 100644 --- a/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt +++ b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,31 +12,30 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,15)) - │ ├── arguments: (length: 1) - │ │ └── @ ArrayNode (location: (1,2)-(1,15)) - │ │ ├── elements: (length: 2) - │ │ │ ├── @ SymbolNode (location: (1,3)-(1,5)) - │ │ │ │ ├── opening_loc: (1,3)-(1,4) = ":" - │ │ │ │ ├── value_loc: (1,4)-(1,5) = "b" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "b" - │ │ │ └── @ KeywordHashNode (location: (1,7)-(1,14)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocNode (location: (1,7)-(1,14)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (1,7)-(1,9)) - │ │ │ │ ├── opening_loc: (1,7)-(1,8) = ":" - │ │ │ │ ├── value_loc: (1,8)-(1,9) = "c" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "c" - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (1,13)-(1,14)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: (1,10)-(1,12) = "=>" - │ │ ├── opening_loc: (1,2)-(1,3) = "[" - │ │ ├── closing_loc: (1,14)-(1,15) = "]" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ArrayNode (location: (1,2)-(1,15)) + │ ├── flags: ∅ + │ ├── elements: (length: 2) + │ │ ├── @ SymbolNode (location: (1,3)-(1,5)) + │ │ │ ├── opening_loc: (1,3)-(1,4) = ":" + │ │ │ ├── value_loc: (1,4)-(1,5) = "b" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "b" + │ │ └── @ KeywordHashNode (location: (1,7)-(1,14)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (1,7)-(1,14)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (1,7)-(1,9)) + │ │ │ ├── opening_loc: (1,7)-(1,8) = ":" + │ │ │ ├── value_loc: (1,8)-(1,9) = "c" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "c" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (1,13)-(1,14)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: (1,10)-(1,12) = "=>" + │ ├── opening_loc: (1,2)-(1,3) = "[" + │ └── closing_loc: (1,14)-(1,15) = "]" ├── closing_loc: (1,15)-(1,16) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_assoc.txt b/test/prism/snapshots/seattlerb/call_assoc.txt index 5a81c89214..530b25e465 100644 --- a/test/prism/snapshots/seattlerb/call_assoc.txt +++ b/test/prism/snapshots/seattlerb/call_assoc.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,18 +12,17 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,2)-(1,6)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,2)-(1,6)) - │ │ ├── key: - │ │ │ @ IntegerNode (location: (1,2)-(1,3)) - │ │ │ └── flags: decimal - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,5)-(1,6)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,3)-(1,5) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,2)-(1,6)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,2)-(1,6)) + │ ├── key: + │ │ @ IntegerNode (location: (1,2)-(1,3)) + │ │ └── flags: decimal + │ ├── value: + │ │ @ IntegerNode (location: (1,5)-(1,6)) + │ │ └── flags: decimal + │ └── operator_loc: (1,3)-(1,5) = "=>" ├── closing_loc: (1,6)-(1,7) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_assoc_new.txt b/test/prism/snapshots/seattlerb/call_assoc_new.txt index e37e00e824..984aecf9b7 100644 --- a/test/prism/snapshots/seattlerb/call_assoc_new.txt +++ b/test/prism/snapshots/seattlerb/call_assoc_new.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,21 +12,20 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,2)-(1,5)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,2)-(1,5)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,2)-(1,4)) - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (1,2)-(1,3) = "a" - │ │ │ ├── closing_loc: (1,3)-(1,4) = ":" - │ │ │ └── unescaped: "a" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,4)-(1,5)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,2)-(1,5)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,2)-(1,5)) + │ ├── key: + │ │ @ SymbolNode (location: (1,2)-(1,4)) + │ │ ├── opening_loc: ∅ + │ │ ├── value_loc: (1,2)-(1,3) = "a" + │ │ ├── closing_loc: (1,3)-(1,4) = ":" + │ │ └── unescaped: "a" + │ ├── value: + │ │ @ IntegerNode (location: (1,4)-(1,5)) + │ │ └── flags: decimal + │ └── operator_loc: ∅ ├── closing_loc: (1,5)-(1,6) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt index 1e6c1fae01..49d1ad17e4 100644 --- a/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt +++ b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,4)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(5,4)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,43 +12,42 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(5,3)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,2)-(5,3)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,2)-(5,3)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,2)-(1,4)) - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (1,2)-(1,3) = "b" - │ │ │ ├── closing_loc: (1,3)-(1,4) = ":" - │ │ │ └── unescaped: "b" - │ │ ├── value: - │ │ │ @ IfNode (location: (1,5)-(5,3)) - │ │ │ ├── if_keyword_loc: (1,5)-(1,7) = "if" - │ │ │ ├── predicate: - │ │ │ │ @ SymbolNode (location: (1,8)-(1,10)) - │ │ │ │ ├── opening_loc: (1,8)-(1,9) = ":" - │ │ │ │ ├── value_loc: (1,9)-(1,10) = "c" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "c" - │ │ │ ├── then_keyword_loc: ∅ - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (2,0)-(2,1)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (2,0)-(2,1)) - │ │ │ │ └── flags: decimal - │ │ │ ├── consequent: - │ │ │ │ @ ElseNode (location: (3,0)-(5,3)) - │ │ │ │ ├── else_keyword_loc: (3,0)-(3,4) = "else" - │ │ │ │ ├── statements: - │ │ │ │ │ @ StatementsNode (location: (4,0)-(4,1)) - │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ └── @ IntegerNode (location: (4,0)-(4,1)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" - │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,2)-(5,3)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,2)-(5,3)) + │ ├── key: + │ │ @ SymbolNode (location: (1,2)-(1,4)) + │ │ ├── opening_loc: ∅ + │ │ ├── value_loc: (1,2)-(1,3) = "b" + │ │ ├── closing_loc: (1,3)-(1,4) = ":" + │ │ └── unescaped: "b" + │ ├── value: + │ │ @ IfNode (location: (1,5)-(5,3)) + │ │ ├── if_keyword_loc: (1,5)-(1,7) = "if" + │ │ ├── predicate: + │ │ │ @ SymbolNode (location: (1,8)-(1,10)) + │ │ │ ├── opening_loc: (1,8)-(1,9) = ":" + │ │ │ ├── value_loc: (1,9)-(1,10) = "c" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "c" + │ │ ├── then_keyword_loc: ∅ + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (2,0)-(2,1)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ IntegerNode (location: (2,0)-(2,1)) + │ │ │ └── flags: decimal + │ │ ├── consequent: + │ │ │ @ ElseNode (location: (3,0)-(5,3)) + │ │ │ ├── else_keyword_loc: (3,0)-(3,4) = "else" + │ │ │ ├── statements: + │ │ │ │ @ StatementsNode (location: (4,0)-(4,1)) + │ │ │ │ └── body: (length: 1) + │ │ │ │ └── @ IntegerNode (location: (4,0)-(4,1)) + │ │ │ │ └── flags: decimal + │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" + │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" + │ └── operator_loc: ∅ ├── closing_loc: (5,3)-(5,4) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt index 6c6cd49358..ae3b5882ad 100644 --- a/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt +++ b/test/prism/snapshots/seattlerb/call_assoc_trailing_comma.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,8)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,18 +12,17 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,2)-(1,6)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,2)-(1,6)) - │ │ ├── key: - │ │ │ @ IntegerNode (location: (1,2)-(1,3)) - │ │ │ └── flags: decimal - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,5)-(1,6)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,3)-(1,5) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,2)-(1,6)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,2)-(1,6)) + │ ├── key: + │ │ @ IntegerNode (location: (1,2)-(1,3)) + │ │ └── flags: decimal + │ ├── value: + │ │ @ IntegerNode (location: (1,5)-(1,6)) + │ │ └── flags: decimal + │ └── operator_loc: (1,3)-(1,5) = "=>" ├── closing_loc: (1,7)-(1,8) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_bang_command_call.txt b/test/prism/snapshots/seattlerb/call_bang_command_call.txt index cfc96e3ef8..1631f7dd6e 100644 --- a/test/prism/snapshots/seattlerb/call_bang_command_call.txt +++ b/test/prism/snapshots/seattlerb/call_bang_command_call.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,2)-(1,7)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,2)-(1,3)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,26 +18,23 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,3)-(1,4) = "." │ ├── name: :b │ ├── message_loc: (1,4)-(1,5) = "b" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,6)-(1,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ │ └── flags: decimal │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :! ├── message_loc: (1,0)-(1,1) = "!" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_bang_squiggle.txt b/test/prism/snapshots/seattlerb/call_bang_squiggle.txt index 40ebf4c394..ba7dcfa262 100644 --- a/test/prism/snapshots/seattlerb/call_bang_squiggle.txt +++ b/test/prism/snapshots/seattlerb/call_bang_squiggle.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt index 2ac8fe131d..037ab33222 100644 --- a/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt +++ b/test/prism/snapshots/seattlerb/call_begin_call_block_call.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,44 +12,43 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(3,3)) - │ ├── arguments: (length: 1) - │ │ └── @ BeginNode (location: (1,2)-(3,3)) - │ │ ├── begin_keyword_loc: (1,2)-(1,7) = "begin" - │ │ ├── statements: - │ │ │ @ StatementsNode (location: (2,0)-(2,10)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (2,0)-(2,10)) - │ │ │ ├── receiver: - │ │ │ │ @ CallNode (location: (2,0)-(2,1)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :b - │ │ │ │ ├── message_loc: (2,0)-(2,1) = "b" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── call_operator_loc: (2,1)-(2,2) = "." - │ │ │ ├── name: :c - │ │ │ ├── message_loc: (2,2)-(2,3) = "c" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: - │ │ │ │ @ BlockNode (location: (2,4)-(2,10)) - │ │ │ │ ├── locals: [] - │ │ │ │ ├── locals_body_index: 0 - │ │ │ │ ├── parameters: ∅ - │ │ │ │ ├── body: ∅ - │ │ │ │ ├── opening_loc: (2,4)-(2,6) = "do" - │ │ │ │ └── closing_loc: (2,7)-(2,10) = "end" - │ │ │ └── flags: ∅ - │ │ ├── rescue_clause: ∅ - │ │ ├── else_clause: ∅ - │ │ ├── ensure_clause: ∅ - │ │ └── end_keyword_loc: (3,0)-(3,3) = "end" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ BeginNode (location: (1,2)-(3,3)) + │ ├── begin_keyword_loc: (1,2)-(1,7) = "begin" + │ ├── statements: + │ │ @ StatementsNode (location: (2,0)-(2,10)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (2,0)-(2,10)) + │ │ ├── flags: ∅ + │ │ ├── receiver: + │ │ │ @ CallNode (location: (2,0)-(2,1)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :b + │ │ │ ├── message_loc: (2,0)-(2,1) = "b" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── call_operator_loc: (2,1)-(2,2) = "." + │ │ ├── name: :c + │ │ ├── message_loc: (2,2)-(2,3) = "c" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: + │ │ @ BlockNode (location: (2,4)-(2,10)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── parameters: ∅ + │ │ ├── body: ∅ + │ │ ├── opening_loc: (2,4)-(2,6) = "do" + │ │ └── closing_loc: (2,7)-(2,10) = "end" + │ ├── rescue_clause: ∅ + │ ├── else_clause: ∅ + │ ├── ensure_clause: ∅ + │ └── end_keyword_loc: (3,0)-(3,3) = "end" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_block_arg_named.txt b/test/prism/snapshots/seattlerb/call_block_arg_named.txt index 9e5bacfe29..24e9dd6cc9 100644 --- a/test/prism/snapshots/seattlerb/call_block_arg_named.txt +++ b/test/prism/snapshots/seattlerb/call_block_arg_named.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -11,18 +12,17 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: ∅ ├── closing_loc: (1,6)-(1,7) = ")" - ├── block: - │ @ BlockArgumentNode (location: (1,2)-(1,6)) - │ ├── expression: - │ │ @ CallNode (location: (1,3)-(1,6)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :blk - │ │ ├── message_loc: (1,3)-(1,6) = "blk" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ └── operator_loc: (1,2)-(1,3) = "&" - └── flags: ∅ + └── block: + @ BlockArgumentNode (location: (1,2)-(1,6)) + ├── expression: + │ @ CallNode (location: (1,3)-(1,6)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :blk + │ ├── message_loc: (1,3)-(1,6) = "blk" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + └── operator_loc: (1,2)-(1,3) = "&" diff --git a/test/prism/snapshots/seattlerb/call_carat.txt b/test/prism/snapshots/seattlerb/call_carat.txt index d62eb417c7..7c0fdbc7bc 100644 --- a/test/prism/snapshots/seattlerb/call_carat.txt +++ b/test/prism/snapshots/seattlerb/call_carat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_colon2.txt b/test/prism/snapshots/seattlerb/call_colon2.txt index 9581348c6f..98bfc63126 100644 --- a/test/prism/snapshots/seattlerb/call_colon2.txt +++ b/test/prism/snapshots/seattlerb/call_colon2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,4)) + ├── flags: ∅ ├── receiver: │ @ ConstantReadNode (location: (1,0)-(1,1)) │ └── name: :A @@ -13,5 +14,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_colon_parens.txt b/test/prism/snapshots/seattlerb/call_colon_parens.txt index dcdbfb4ede..5522d7b39d 100644 --- a/test/prism/snapshots/seattlerb/call_colon_parens.txt +++ b/test/prism/snapshots/seattlerb/call_colon_parens.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,5 +14,4 @@ ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: ∅ ├── closing_loc: (1,4)-(1,5) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_div.txt b/test/prism/snapshots/seattlerb/call_div.txt index 7b6fdcabef..bc4e4c94cf 100644 --- a/test/prism/snapshots/seattlerb/call_div.txt +++ b/test/prism/snapshots/seattlerb/call_div.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_dot_parens.txt b/test/prism/snapshots/seattlerb/call_dot_parens.txt index 774c719d93..8c0989c7bc 100644 --- a/test/prism/snapshots/seattlerb/call_dot_parens.txt +++ b/test/prism/snapshots/seattlerb/call_dot_parens.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,4)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,5 +14,4 @@ ├── opening_loc: (1,2)-(1,3) = "(" ├── arguments: ∅ ├── closing_loc: (1,3)-(1,4) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_env.txt b/test/prism/snapshots/seattlerb/call_env.txt index c2863bb069..7b502cf511 100644 --- a/test/prism/snapshots/seattlerb/call_env.txt +++ b/test/prism/snapshots/seattlerb/call_env.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :happy ├── message_loc: (1,2)-(1,7) = "happy" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_eq3.txt b/test/prism/snapshots/seattlerb/call_eq3.txt index 5d53180b41..4a31d62679 100644 --- a/test/prism/snapshots/seattlerb/call_eq3.txt +++ b/test/prism/snapshots/seattlerb/call_eq3.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,6)-(1,7)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_gt.txt b/test/prism/snapshots/seattlerb/call_gt.txt index 33bc1de6cf..5d766435da 100644 --- a/test/prism/snapshots/seattlerb/call_gt.txt +++ b/test/prism/snapshots/seattlerb/call_gt.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_kwsplat.txt b/test/prism/snapshots/seattlerb/call_kwsplat.txt index 7e341fcbec..f2effca19e 100644 --- a/test/prism/snapshots/seattlerb/call_kwsplat.txt +++ b/test/prism/snapshots/seattlerb/call_kwsplat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,15 +12,14 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,2)-(1,5)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocSplatNode (location: (1,2)-(1,5)) - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,4)-(1,5)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,2)-(1,4) = "**" - │ └── flags: contains_keyword_splat + │ ├── flags: contains_keyword_splat + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,2)-(1,5)) + │ └── elements: (length: 1) + │ └── @ AssocSplatNode (location: (1,2)-(1,5)) + │ ├── value: + │ │ @ IntegerNode (location: (1,4)-(1,5)) + │ │ └── flags: decimal + │ └── operator_loc: (1,2)-(1,4) = "**" ├── closing_loc: (1,5)-(1,6) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_leading_dots.txt b/test/prism/snapshots/seattlerb/call_leading_dots.txt index c706cf6a5b..943dd871d3 100644 --- a/test/prism/snapshots/seattlerb/call_leading_dots.txt +++ b/test/prism/snapshots/seattlerb/call_leading_dots.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(3,2)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,2)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(2,2)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,21 +18,18 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (2,0)-(2,1) = "." │ ├── name: :b │ ├── message_loc: (2,1)-(2,2) = "b" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── call_operator_loc: (3,0)-(3,1) = "." ├── name: :c ├── message_loc: (3,1)-(3,2) = "c" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt b/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt index ee1abe6fc5..bebe26f994 100644 --- a/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt +++ b/test/prism/snapshots/seattlerb/call_leading_dots_comment.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(4,2)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(4,2)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(2,2)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,21 +18,18 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (2,0)-(2,1) = "." │ ├── name: :b │ ├── message_loc: (2,1)-(2,2) = "b" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── call_operator_loc: (4,0)-(4,1) = "." ├── name: :d ├── message_loc: (4,1)-(4,2) = "d" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_lt.txt b/test/prism/snapshots/seattlerb/call_lt.txt index 64c3967dcb..11308d4664 100644 --- a/test/prism/snapshots/seattlerb/call_lt.txt +++ b/test/prism/snapshots/seattlerb/call_lt.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_lte.txt b/test/prism/snapshots/seattlerb/call_lte.txt index 7f7dfb3bbf..3bf6cfd433 100644 --- a/test/prism/snapshots/seattlerb/call_lte.txt +++ b/test/prism/snapshots/seattlerb/call_lte.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_not.txt b/test/prism/snapshots/seattlerb/call_not.txt index 157f8df593..a370633ed3 100644 --- a/test/prism/snapshots/seattlerb/call_not.txt +++ b/test/prism/snapshots/seattlerb/call_not.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,4)-(1,6)) │ └── flags: decimal @@ -13,5 +14,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_pipe.txt b/test/prism/snapshots/seattlerb/call_pipe.txt index 562dd56398..2300d68c77 100644 --- a/test/prism/snapshots/seattlerb/call_pipe.txt +++ b/test/prism/snapshots/seattlerb/call_pipe.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_rshift.txt b/test/prism/snapshots/seattlerb/call_rshift.txt index 8a9212b1f5..53fcc9cbbe 100644 --- a/test/prism/snapshots/seattlerb/call_rshift.txt +++ b/test/prism/snapshots/seattlerb/call_rshift.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_self_brackets.txt b/test/prism/snapshots/seattlerb/call_self_brackets.txt index c3e431e654..f5652a807e 100644 --- a/test/prism/snapshots/seattlerb/call_self_brackets.txt +++ b/test/prism/snapshots/seattlerb/call_self_brackets.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ SelfNode (location: (1,0)-(1,4)) ├── call_operator_loc: ∅ @@ -12,10 +13,9 @@ ├── opening_loc: (1,4)-(1,5) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ └── flags: decimal ├── closing_loc: (1,6)-(1,7) = "]" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_spaceship.txt b/test/prism/snapshots/seattlerb/call_spaceship.txt index a35437d361..450a45b749 100644 --- a/test/prism/snapshots/seattlerb/call_spaceship.txt +++ b/test/prism/snapshots/seattlerb/call_spaceship.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,6)-(1,7)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt b/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt index 9c088aef64..4f3ba3bac8 100644 --- a/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt +++ b/test/prism/snapshots/seattlerb/call_stabby_do_end_with_block.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,22)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,22)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,13)) - │ ├── arguments: (length: 1) - │ │ └── @ LambdaNode (location: (1,2)-(1,13)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── operator_loc: (1,2)-(1,4) = "->" - │ │ ├── opening_loc: (1,5)-(1,7) = "do" - │ │ ├── closing_loc: (1,10)-(1,13) = "end" - │ │ ├── parameters: ∅ - │ │ └── body: - │ │ @ StatementsNode (location: (1,8)-(1,9)) - │ │ └── body: (length: 1) - │ │ └── @ IntegerNode (location: (1,8)-(1,9)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LambdaNode (location: (1,2)-(1,13)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── operator_loc: (1,2)-(1,4) = "->" + │ ├── opening_loc: (1,5)-(1,7) = "do" + │ ├── closing_loc: (1,10)-(1,13) = "end" + │ ├── parameters: ∅ + │ └── body: + │ @ StatementsNode (location: (1,8)-(1,9)) + │ └── body: (length: 1) + │ └── @ IntegerNode (location: (1,8)-(1,9)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,14)-(1,22)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ StatementsNode (location: (1,17)-(1,18)) - │ │ └── body: (length: 1) - │ │ └── @ IntegerNode (location: (1,17)-(1,18)) - │ │ └── flags: decimal - │ ├── opening_loc: (1,14)-(1,16) = "do" - │ └── closing_loc: (1,19)-(1,22) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,14)-(1,22)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ StatementsNode (location: (1,17)-(1,18)) + │ └── body: (length: 1) + │ └── @ IntegerNode (location: (1,17)-(1,18)) + │ └── flags: decimal + ├── opening_loc: (1,14)-(1,16) = "do" + └── closing_loc: (1,19)-(1,22) = "end" diff --git a/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt index 8494370d36..34c65e80f1 100644 --- a/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt +++ b/test/prism/snapshots/seattlerb/call_stabby_with_braces_block.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,19)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,19)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,10)) - │ ├── arguments: (length: 1) - │ │ └── @ LambdaNode (location: (1,2)-(1,10)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── operator_loc: (1,2)-(1,4) = "->" - │ │ ├── opening_loc: (1,5)-(1,6) = "{" - │ │ ├── closing_loc: (1,9)-(1,10) = "}" - │ │ ├── parameters: ∅ - │ │ └── body: - │ │ @ StatementsNode (location: (1,7)-(1,8)) - │ │ └── body: (length: 1) - │ │ └── @ IntegerNode (location: (1,7)-(1,8)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LambdaNode (location: (1,2)-(1,10)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── operator_loc: (1,2)-(1,4) = "->" + │ ├── opening_loc: (1,5)-(1,6) = "{" + │ ├── closing_loc: (1,9)-(1,10) = "}" + │ ├── parameters: ∅ + │ └── body: + │ @ StatementsNode (location: (1,7)-(1,8)) + │ └── body: (length: 1) + │ └── @ IntegerNode (location: (1,7)-(1,8)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,11)-(1,19)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ StatementsNode (location: (1,14)-(1,15)) - │ │ └── body: (length: 1) - │ │ └── @ IntegerNode (location: (1,14)-(1,15)) - │ │ └── flags: decimal - │ ├── opening_loc: (1,11)-(1,13) = "do" - │ └── closing_loc: (1,16)-(1,19) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,11)-(1,19)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ StatementsNode (location: (1,14)-(1,15)) + │ └── body: (length: 1) + │ └── @ IntegerNode (location: (1,14)-(1,15)) + │ └── flags: decimal + ├── opening_loc: (1,11)-(1,13) = "do" + └── closing_loc: (1,16)-(1,19) = "end" diff --git a/test/prism/snapshots/seattlerb/call_star.txt b/test/prism/snapshots/seattlerb/call_star.txt index 5246bf4856..ba3099a0c6 100644 --- a/test/prism/snapshots/seattlerb/call_star.txt +++ b/test/prism/snapshots/seattlerb/call_star.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_star2.txt b/test/prism/snapshots/seattlerb/call_star2.txt index 792c494f57..d6f112fc2c 100644 --- a/test/prism/snapshots/seattlerb/call_star2.txt +++ b/test/prism/snapshots/seattlerb/call_star2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_trailing_comma.txt b/test/prism/snapshots/seattlerb/call_trailing_comma.txt index 6542595104..0e0dd27e38 100644 --- a/test/prism/snapshots/seattlerb/call_trailing_comma.txt +++ b/test/prism/snapshots/seattlerb/call_trailing_comma.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,10 +12,9 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,3)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,2)-(1,3)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,2)-(1,3)) + │ └── flags: decimal ├── closing_loc: (1,4)-(1,5) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_trailing_dots.txt b/test/prism/snapshots/seattlerb/call_trailing_dots.txt index a337486e89..f0f374f3d4 100644 --- a/test/prism/snapshots/seattlerb/call_trailing_dots.txt +++ b/test/prism/snapshots/seattlerb/call_trailing_dots.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(3,1)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,1)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(2,1)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,21 +18,18 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,1)-(1,2) = "." │ ├── name: :b │ ├── message_loc: (2,0)-(2,1) = "b" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── call_operator_loc: (2,1)-(2,2) = "." ├── name: :c ├── message_loc: (3,0)-(3,1) = "c" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/call_unary_bang.txt b/test/prism/snapshots/seattlerb/call_unary_bang.txt index 378a11b738..03b295254a 100644 --- a/test/prism/snapshots/seattlerb/call_unary_bang.txt +++ b/test/prism/snapshots/seattlerb/call_unary_bang.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,2)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,2)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,1)-(1,2)) │ └── flags: decimal @@ -13,5 +14,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/case_in.txt b/test/prism/snapshots/seattlerb/case_in.txt index e66b4597b2..0795f20792 100644 --- a/test/prism/snapshots/seattlerb/case_in.txt +++ b/test/prism/snapshots/seattlerb/case_in.txt @@ -45,6 +45,7 @@ │ │ └── @ InNode (location: (6,0)-(6,10)) │ │ ├── pattern: │ │ │ @ ArrayNode (location: (6,3)-(6,10)) + │ │ │ ├── flags: ∅ │ │ │ ├── elements: (length: 2) │ │ │ │ ├── @ SymbolNode (location: (6,6)-(6,7)) │ │ │ │ │ ├── opening_loc: ∅ @@ -57,8 +58,7 @@ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "b" │ │ │ ├── opening_loc: (6,3)-(6,6) = "%I[" - │ │ │ ├── closing_loc: (6,9)-(6,10) = "]" - │ │ │ └── flags: ∅ + │ │ │ └── closing_loc: (6,9)-(6,10) = "]" │ │ ├── statements: ∅ │ │ ├── in_loc: (6,0)-(6,2) = "in" │ │ └── then_loc: ∅ @@ -76,6 +76,7 @@ │ │ └── @ InNode (location: (10,0)-(10,10)) │ │ ├── pattern: │ │ │ @ ArrayNode (location: (10,3)-(10,10)) + │ │ │ ├── flags: ∅ │ │ │ ├── elements: (length: 2) │ │ │ │ ├── @ StringNode (location: (10,6)-(10,7)) │ │ │ │ │ ├── flags: ∅ @@ -90,8 +91,7 @@ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "b" │ │ │ ├── opening_loc: (10,3)-(10,6) = "%W[" - │ │ │ ├── closing_loc: (10,9)-(10,10) = "]" - │ │ │ └── flags: ∅ + │ │ │ └── closing_loc: (10,9)-(10,10) = "]" │ │ ├── statements: ∅ │ │ ├── in_loc: (10,0)-(10,2) = "in" │ │ └── then_loc: ∅ @@ -109,6 +109,7 @@ │ │ └── @ InNode (location: (14,0)-(14,10)) │ │ ├── pattern: │ │ │ @ ArrayNode (location: (14,3)-(14,10)) + │ │ │ ├── flags: ∅ │ │ │ ├── elements: (length: 2) │ │ │ │ ├── @ SymbolNode (location: (14,6)-(14,7)) │ │ │ │ │ ├── opening_loc: ∅ @@ -121,8 +122,7 @@ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "b" │ │ │ ├── opening_loc: (14,3)-(14,6) = "%i[" - │ │ │ ├── closing_loc: (14,9)-(14,10) = "]" - │ │ │ └── flags: ∅ + │ │ │ └── closing_loc: (14,9)-(14,10) = "]" │ │ ├── statements: ∅ │ │ ├── in_loc: (14,0)-(14,2) = "in" │ │ └── then_loc: ∅ @@ -140,6 +140,7 @@ │ │ └── @ InNode (location: (18,0)-(18,10)) │ │ ├── pattern: │ │ │ @ ArrayNode (location: (18,3)-(18,10)) + │ │ │ ├── flags: ∅ │ │ │ ├── elements: (length: 2) │ │ │ │ ├── @ StringNode (location: (18,6)-(18,7)) │ │ │ │ │ ├── flags: ∅ @@ -154,8 +155,7 @@ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "b" │ │ │ ├── opening_loc: (18,3)-(18,6) = "%w[" - │ │ │ ├── closing_loc: (18,9)-(18,10) = "]" - │ │ │ └── flags: ∅ + │ │ │ └── closing_loc: (18,9)-(18,10) = "]" │ │ ├── statements: ∅ │ │ ├── in_loc: (18,0)-(18,2) = "in" │ │ └── then_loc: ∅ @@ -173,12 +173,12 @@ │ │ └── @ InNode (location: (22,0)-(22,9)) │ │ ├── pattern: │ │ │ @ RangeNode (location: (22,4)-(22,9)) + │ │ │ ├── flags: exclude_end │ │ │ ├── left: ∅ │ │ │ ├── right: │ │ │ │ @ IntegerNode (location: (22,7)-(22,9)) │ │ │ │ └── flags: decimal - │ │ │ ├── operator_loc: (22,4)-(22,7) = "..." - │ │ │ └── flags: exclude_end + │ │ │ └── operator_loc: (22,4)-(22,7) = "..." │ │ ├── statements: ∅ │ │ ├── in_loc: (22,0)-(22,2) = "in" │ │ └── then_loc: ∅ @@ -196,12 +196,12 @@ │ │ └── @ InNode (location: (26,0)-(26,8)) │ │ ├── pattern: │ │ │ @ RangeNode (location: (26,4)-(26,8)) + │ │ │ ├── flags: ∅ │ │ │ ├── left: ∅ │ │ │ ├── right: │ │ │ │ @ IntegerNode (location: (26,6)-(26,8)) │ │ │ │ └── flags: decimal - │ │ │ ├── operator_loc: (26,4)-(26,6) = ".." - │ │ │ └── flags: ∅ + │ │ │ └── operator_loc: (26,4)-(26,6) = ".." │ │ ├── statements: ∅ │ │ ├── in_loc: (26,0)-(26,2) = "in" │ │ └── then_loc: ∅ @@ -219,12 +219,12 @@ │ │ └── @ InNode (location: (30,0)-(30,8)) │ │ ├── pattern: │ │ │ @ RangeNode (location: (30,4)-(30,8)) + │ │ │ ├── flags: exclude_end │ │ │ ├── left: │ │ │ │ @ IntegerNode (location: (30,4)-(30,5)) │ │ │ │ └── flags: decimal │ │ │ ├── right: ∅ - │ │ │ ├── operator_loc: (30,5)-(30,8) = "..." - │ │ │ └── flags: exclude_end + │ │ │ └── operator_loc: (30,5)-(30,8) = "..." │ │ ├── statements: ∅ │ │ ├── in_loc: (30,0)-(30,2) = "in" │ │ └── then_loc: ∅ @@ -242,14 +242,14 @@ │ │ └── @ InNode (location: (34,0)-(34,9)) │ │ ├── pattern: │ │ │ @ RangeNode (location: (34,4)-(34,9)) + │ │ │ ├── flags: exclude_end │ │ │ ├── left: │ │ │ │ @ IntegerNode (location: (34,4)-(34,5)) │ │ │ │ └── flags: decimal │ │ │ ├── right: │ │ │ │ @ IntegerNode (location: (34,8)-(34,9)) │ │ │ │ └── flags: decimal - │ │ │ ├── operator_loc: (34,5)-(34,8) = "..." - │ │ │ └── flags: exclude_end + │ │ │ └── operator_loc: (34,5)-(34,8) = "..." │ │ ├── statements: ∅ │ │ ├── in_loc: (34,0)-(34,2) = "in" │ │ └── then_loc: ∅ @@ -310,11 +310,11 @@ │ │ └── @ InNode (location: (46,0)-(46,11)) │ │ ├── pattern: │ │ │ @ RegularExpressionNode (location: (46,3)-(46,11)) + │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (46,3)-(46,4) = "/" │ │ │ ├── content_loc: (46,4)-(46,10) = "regexp" │ │ │ ├── closing_loc: (46,10)-(46,11) = "/" - │ │ │ ├── unescaped: "regexp" - │ │ │ └── flags: ∅ + │ │ │ └── unescaped: "regexp" │ │ ├── statements: ∅ │ │ ├── in_loc: (46,0)-(46,2) = "in" │ │ └── then_loc: ∅ @@ -735,6 +735,7 @@ │ │ │ │ └── @ PinnedExpressionNode (location: (90,4)-(90,8)) │ │ │ │ ├── expression: │ │ │ │ │ @ CallNode (location: (90,6)-(90,7)) + │ │ │ │ │ ├── flags: variable_call │ │ │ │ │ ├── receiver: ∅ │ │ │ │ │ ├── call_operator_loc: ∅ │ │ │ │ │ ├── name: :a @@ -742,8 +743,7 @@ │ │ │ │ │ ├── opening_loc: ∅ │ │ │ │ │ ├── arguments: ∅ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ └── flags: variable_call + │ │ │ │ │ └── block: ∅ │ │ │ │ ├── operator_loc: (90,4)-(90,5) = "^" │ │ │ │ ├── lparen_loc: (90,5)-(90,6) = "(" │ │ │ │ └── rparen_loc: (90,7)-(90,8) = ")" diff --git a/test/prism/snapshots/seattlerb/case_in_67.txt b/test/prism/snapshots/seattlerb/case_in_67.txt index 55b188a652..612f4fa6d3 100644 --- a/test/prism/snapshots/seattlerb/case_in_67.txt +++ b/test/prism/snapshots/seattlerb/case_in_67.txt @@ -14,12 +14,12 @@ │ └── @ InNode (location: (2,0)-(2,15)) │ ├── pattern: │ │ @ RangeNode (location: (2,3)-(2,6)) + │ │ ├── flags: ∅ │ │ ├── left: │ │ │ @ IntegerNode (location: (2,3)-(2,4)) │ │ │ └── flags: decimal │ │ ├── right: ∅ - │ │ ├── operator_loc: (2,4)-(2,6) = ".." - │ │ └── flags: ∅ + │ │ └── operator_loc: (2,4)-(2,6) = ".." │ ├── statements: │ │ @ StatementsNode (location: (2,12)-(2,15)) │ │ └── body: (length: 1) diff --git a/test/prism/snapshots/seattlerb/case_in_86.txt b/test/prism/snapshots/seattlerb/case_in_86.txt index 7e789c7145..0c9ad3bb31 100644 --- a/test/prism/snapshots/seattlerb/case_in_86.txt +++ b/test/prism/snapshots/seattlerb/case_in_86.txt @@ -6,6 +6,7 @@ └── @ CaseMatchNode (location: (1,0)-(3,3)) ├── predicate: │ @ ArrayNode (location: (1,5)-(1,13)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ SymbolNode (location: (1,6)-(1,8)) │ │ │ ├── opening_loc: (1,6)-(1,7) = ":" @@ -18,8 +19,7 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b" │ ├── opening_loc: (1,5)-(1,6) = "[" - │ ├── closing_loc: (1,12)-(1,13) = "]" - │ └── flags: ∅ + │ └── closing_loc: (1,12)-(1,13) = "]" ├── conditions: (length: 1) │ └── @ InNode (location: (2,0)-(2,25)) │ ├── pattern: diff --git a/test/prism/snapshots/seattlerb/case_in_86_2.txt b/test/prism/snapshots/seattlerb/case_in_86_2.txt index 58c154f46c..9db0a0332d 100644 --- a/test/prism/snapshots/seattlerb/case_in_86_2.txt +++ b/test/prism/snapshots/seattlerb/case_in_86_2.txt @@ -6,6 +6,7 @@ └── @ CaseMatchNode (location: (1,0)-(3,3)) ├── predicate: │ @ ArrayNode (location: (1,5)-(1,13)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ SymbolNode (location: (1,6)-(1,8)) │ │ │ ├── opening_loc: (1,6)-(1,7) = ":" @@ -18,8 +19,7 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b" │ ├── opening_loc: (1,5)-(1,6) = "[" - │ ├── closing_loc: (1,12)-(1,13) = "]" - │ └── flags: ∅ + │ └── closing_loc: (1,12)-(1,13) = "]" ├── conditions: (length: 1) │ └── @ InNode (location: (2,0)-(2,25)) │ ├── pattern: diff --git a/test/prism/snapshots/seattlerb/dasgn_icky2.txt b/test/prism/snapshots/seattlerb/dasgn_icky2.txt index 96e4277b9c..83497a3c72 100644 --- a/test/prism/snapshots/seattlerb/dasgn_icky2.txt +++ b/test/prism/snapshots/seattlerb/dasgn_icky2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(8,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(8,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,52 +12,51 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(8,3)) - │ ├── locals: [:v] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ StatementsNode (location: (2,2)-(7,5)) - │ │ └── body: (length: 2) - │ │ ├── @ LocalVariableWriteNode (location: (2,2)-(2,9)) - │ │ │ ├── name: :v - │ │ │ ├── depth: 0 - │ │ │ ├── name_loc: (2,2)-(2,3) = "v" - │ │ │ ├── value: - │ │ │ │ @ NilNode (location: (2,6)-(2,9)) - │ │ │ └── operator_loc: (2,4)-(2,5) = "=" - │ │ └── @ BeginNode (location: (3,2)-(7,5)) - │ │ ├── begin_keyword_loc: (3,2)-(3,7) = "begin" - │ │ ├── statements: - │ │ │ @ StatementsNode (location: (4,4)-(4,9)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ YieldNode (location: (4,4)-(4,9)) - │ │ │ ├── keyword_loc: (4,4)-(4,9) = "yield" - │ │ │ ├── lparen_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ └── rparen_loc: ∅ - │ │ ├── rescue_clause: - │ │ │ @ RescueNode (location: (5,2)-(6,9)) - │ │ │ ├── keyword_loc: (5,2)-(5,8) = "rescue" - │ │ │ ├── exceptions: (length: 1) - │ │ │ │ └── @ ConstantReadNode (location: (5,9)-(5,18)) - │ │ │ │ └── name: :Exception - │ │ │ ├── operator_loc: (5,19)-(5,21) = "=>" - │ │ │ ├── reference: - │ │ │ │ @ LocalVariableTargetNode (location: (5,22)-(5,23)) - │ │ │ │ ├── name: :v - │ │ │ │ └── depth: 0 - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (6,4)-(6,9)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ BreakNode (location: (6,4)-(6,9)) - │ │ │ │ ├── arguments: ∅ - │ │ │ │ └── keyword_loc: (6,4)-(6,9) = "break" - │ │ │ └── consequent: ∅ - │ │ ├── else_clause: ∅ - │ │ ├── ensure_clause: ∅ - │ │ └── end_keyword_loc: (7,2)-(7,5) = "end" - │ ├── opening_loc: (1,2)-(1,4) = "do" - │ └── closing_loc: (8,0)-(8,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(8,3)) + ├── locals: [:v] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ StatementsNode (location: (2,2)-(7,5)) + │ └── body: (length: 2) + │ ├── @ LocalVariableWriteNode (location: (2,2)-(2,9)) + │ │ ├── name: :v + │ │ ├── depth: 0 + │ │ ├── name_loc: (2,2)-(2,3) = "v" + │ │ ├── value: + │ │ │ @ NilNode (location: (2,6)-(2,9)) + │ │ └── operator_loc: (2,4)-(2,5) = "=" + │ └── @ BeginNode (location: (3,2)-(7,5)) + │ ├── begin_keyword_loc: (3,2)-(3,7) = "begin" + │ ├── statements: + │ │ @ StatementsNode (location: (4,4)-(4,9)) + │ │ └── body: (length: 1) + │ │ └── @ YieldNode (location: (4,4)-(4,9)) + │ │ ├── keyword_loc: (4,4)-(4,9) = "yield" + │ │ ├── lparen_loc: ∅ + │ │ ├── arguments: ∅ + │ │ └── rparen_loc: ∅ + │ ├── rescue_clause: + │ │ @ RescueNode (location: (5,2)-(6,9)) + │ │ ├── keyword_loc: (5,2)-(5,8) = "rescue" + │ │ ├── exceptions: (length: 1) + │ │ │ └── @ ConstantReadNode (location: (5,9)-(5,18)) + │ │ │ └── name: :Exception + │ │ ├── operator_loc: (5,19)-(5,21) = "=>" + │ │ ├── reference: + │ │ │ @ LocalVariableTargetNode (location: (5,22)-(5,23)) + │ │ │ ├── name: :v + │ │ │ └── depth: 0 + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (6,4)-(6,9)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ BreakNode (location: (6,4)-(6,9)) + │ │ │ ├── arguments: ∅ + │ │ │ └── keyword_loc: (6,4)-(6,9) = "break" + │ │ └── consequent: ∅ + │ ├── else_clause: ∅ + │ ├── ensure_clause: ∅ + │ └── end_keyword_loc: (7,2)-(7,5) = "end" + ├── opening_loc: (1,2)-(1,4) = "do" + └── closing_loc: (8,0)-(8,3) = "end" diff --git a/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt index d96b5062ed..85f50a79ce 100644 --- a/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt +++ b/test/prism/snapshots/seattlerb/defn_arg_forward_args.txt @@ -23,6 +23,7 @@ │ @ StatementsNode (location: (1,15)-(1,24)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,15)-(1,24)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :b @@ -30,15 +31,14 @@ │ ├── opening_loc: (1,16)-(1,17) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,17)-(1,23)) - │ │ ├── arguments: (length: 2) - │ │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18)) - │ │ │ │ ├── name: :x - │ │ │ │ └── depth: 0 - │ │ │ └── @ ForwardingArgumentsNode (location: (1,20)-(1,23)) - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 2) + │ │ ├── @ LocalVariableReadNode (location: (1,17)-(1,18)) + │ │ │ ├── name: :x + │ │ │ └── depth: 0 + │ │ └── @ ForwardingArgumentsNode (location: (1,20)-(1,23)) │ ├── closing_loc: (1,23)-(1,24) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [:x, :"..."] ├── locals_body_index: 2 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_args_forward_args.txt b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt index 5f9b4b0084..b1854d9a35 100644 --- a/test/prism/snapshots/seattlerb/defn_args_forward_args.txt +++ b/test/prism/snapshots/seattlerb/defn_args_forward_args.txt @@ -27,6 +27,7 @@ │ @ StatementsNode (location: (1,21)-(1,36)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,21)-(1,36)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :b @@ -34,20 +35,19 @@ │ ├── opening_loc: (1,22)-(1,23) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,23)-(1,35)) - │ │ ├── arguments: (length: 3) - │ │ │ ├── @ SymbolNode (location: (1,23)-(1,27)) - │ │ │ │ ├── opening_loc: (1,23)-(1,24) = ":" - │ │ │ │ ├── value_loc: (1,24)-(1,27) = "get" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "get" - │ │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30)) - │ │ │ │ ├── name: :z - │ │ │ │ └── depth: 0 - │ │ │ └── @ ForwardingArgumentsNode (location: (1,32)-(1,35)) - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 3) + │ │ ├── @ SymbolNode (location: (1,23)-(1,27)) + │ │ │ ├── opening_loc: (1,23)-(1,24) = ":" + │ │ │ ├── value_loc: (1,24)-(1,27) = "get" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "get" + │ │ ├── @ LocalVariableReadNode (location: (1,29)-(1,30)) + │ │ │ ├── name: :z + │ │ │ └── depth: 0 + │ │ └── @ ForwardingArgumentsNode (location: (1,32)-(1,35)) │ ├── closing_loc: (1,35)-(1,36) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [:x, :y, :z, :"..."] ├── locals_body_index: 4 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_endless_command.txt b/test/prism/snapshots/seattlerb/defn_endless_command.txt index 432a84098a..f578856927 100644 --- a/test/prism/snapshots/seattlerb/defn_endless_command.txt +++ b/test/prism/snapshots/seattlerb/defn_endless_command.txt @@ -12,6 +12,7 @@ │ @ StatementsNode (location: (1,18)-(1,33)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,18)-(1,33)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :other_method @@ -19,13 +20,12 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,31)-(1,33)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,31)-(1,33)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,31)-(1,33)) + │ │ └── flags: decimal │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [] ├── locals_body_index: 0 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt index c7ed60977b..3a1736771e 100644 --- a/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt +++ b/test/prism/snapshots/seattlerb/defn_endless_command_rescue.txt @@ -14,6 +14,7 @@ │ └── @ RescueModifierNode (location: (1,18)-(1,43)) │ ├── expression: │ │ @ CallNode (location: (1,18)-(1,33)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :other_method @@ -21,13 +22,12 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (1,31)-(1,33)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (1,31)-(1,33)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (1,31)-(1,33)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── keyword_loc: (1,34)-(1,40) = "rescue" │ └── rescue_expression: │ @ IntegerNode (location: (1,41)-(1,43)) diff --git a/test/prism/snapshots/seattlerb/defn_forward_args.txt b/test/prism/snapshots/seattlerb/defn_forward_args.txt index 87a605a2f6..2b0af43df0 100644 --- a/test/prism/snapshots/seattlerb/defn_forward_args.txt +++ b/test/prism/snapshots/seattlerb/defn_forward_args.txt @@ -21,6 +21,7 @@ │ @ StatementsNode (location: (1,12)-(1,18)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,12)-(1,18)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :b @@ -28,12 +29,11 @@ │ ├── opening_loc: (1,13)-(1,14) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,14)-(1,17)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ ForwardingArgumentsNode (location: (1,14)-(1,17)) - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ ForwardingArgumentsNode (location: (1,14)-(1,17)) │ ├── closing_loc: (1,17)-(1,18) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [:"..."] ├── locals_body_index: 1 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt index 69fe71cabd..ad3c108dc2 100644 --- a/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt +++ b/test/prism/snapshots/seattlerb/defn_forward_args__no_parens.txt @@ -21,6 +21,7 @@ │ @ StatementsNode (location: (2,2)-(2,8)) │ └── body: (length: 1) │ └── @ CallNode (location: (2,2)-(2,8)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :m @@ -28,12 +29,11 @@ │ ├── opening_loc: (2,3)-(2,4) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (2,4)-(2,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ ForwardingArgumentsNode (location: (2,4)-(2,7)) - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ ForwardingArgumentsNode (location: (2,4)-(2,7)) │ ├── closing_loc: (2,7)-(2,8) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [:"..."] ├── locals_body_index: 1 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_env.txt b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt index 469d680f19..8c43e4eb0a 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_env.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_env.txt @@ -24,6 +24,7 @@ │ @ StatementsNode (location: (1,20)-(1,41)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,20)-(1,41)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :test_splat @@ -31,19 +32,18 @@ │ ├── opening_loc: (1,30)-(1,31) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,31)-(1,40)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ KeywordHashNode (location: (1,31)-(1,40)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocSplatNode (location: (1,31)-(1,40)) - │ │ │ ├── value: - │ │ │ │ @ LocalVariableReadNode (location: (1,33)-(1,40)) - │ │ │ │ ├── name: :testing - │ │ │ │ └── depth: 0 - │ │ │ └── operator_loc: (1,31)-(1,33) = "**" - │ │ └── flags: contains_keyword_splat + │ │ ├── flags: contains_keyword_splat + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (1,31)-(1,40)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocSplatNode (location: (1,31)-(1,40)) + │ │ ├── value: + │ │ │ @ LocalVariableReadNode (location: (1,33)-(1,40)) + │ │ │ ├── name: :testing + │ │ │ └── depth: 0 + │ │ └── operator_loc: (1,31)-(1,33) = "**" │ ├── closing_loc: (1,40)-(1,41) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [:testing] ├── locals_body_index: 1 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_oneliner.txt b/test/prism/snapshots/seattlerb/defn_oneliner.txt index eaf3269128..02e070dddd 100644 --- a/test/prism/snapshots/seattlerb/defn_oneliner.txt +++ b/test/prism/snapshots/seattlerb/defn_oneliner.txt @@ -22,6 +22,7 @@ │ @ StatementsNode (location: (1,16)-(1,27)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,16)-(1,27)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :system @@ -29,14 +30,13 @@ │ ├── opening_loc: (1,22)-(1,23) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,23)-(1,26)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ LocalVariableReadNode (location: (1,23)-(1,26)) - │ │ │ ├── name: :cmd - │ │ │ └── depth: 0 - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LocalVariableReadNode (location: (1,23)-(1,26)) + │ │ ├── name: :cmd + │ │ └── depth: 0 │ ├── closing_loc: (1,26)-(1,27) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [:cmd] ├── locals_body_index: 1 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt index d1c07fd58a..da1c11496e 100644 --- a/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt +++ b/test/prism/snapshots/seattlerb/defn_oneliner_noargs.txt @@ -12,6 +12,7 @@ │ @ StatementsNode (location: (1,11)-(1,17)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,11)-(1,17)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :system @@ -19,8 +20,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── locals: [] ├── locals_body_index: 0 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt b/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt index 579f629bc9..965d8b9bb3 100644 --- a/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt +++ b/test/prism/snapshots/seattlerb/defn_oneliner_noargs_parentheses.txt @@ -12,6 +12,7 @@ │ @ StatementsNode (location: (1,13)-(1,19)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,13)-(1,19)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :system @@ -19,8 +20,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── locals: [] ├── locals_body_index: 0 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt index 1e052dd5f4..ad58ae383c 100644 --- a/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt +++ b/test/prism/snapshots/seattlerb/defn_oneliner_rescue.txt @@ -25,6 +25,7 @@ │ │ │ @ StatementsNode (location: (2,2)-(2,13)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (2,2)-(2,13)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :system @@ -32,14 +33,13 @@ │ │ │ ├── opening_loc: (2,8)-(2,9) = "(" │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12)) - │ │ │ │ │ ├── name: :cmd - │ │ │ │ │ └── depth: 0 - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12)) + │ │ │ │ ├── name: :cmd + │ │ │ │ └── depth: 0 │ │ │ ├── closing_loc: (2,12)-(2,13) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── rescue_clause: │ │ │ @ RescueNode (location: (3,0)-(4,5)) │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue" @@ -83,6 +83,7 @@ │ │ └── @ RescueModifierNode (location: (9,2)-(9,24)) │ │ ├── expression: │ │ │ @ CallNode (location: (9,2)-(9,13)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :system @@ -90,14 +91,13 @@ │ │ │ ├── opening_loc: (9,8)-(9,9) = "(" │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12)) - │ │ │ │ │ ├── name: :cmd - │ │ │ │ │ └── depth: 0 - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12)) + │ │ │ │ ├── name: :cmd + │ │ │ │ └── depth: 0 │ │ │ ├── closing_loc: (9,12)-(9,13) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── keyword_loc: (9,14)-(9,20) = "rescue" │ │ └── rescue_expression: │ │ @ NilNode (location: (9,21)-(9,24)) @@ -130,6 +130,7 @@ │ └── @ RescueModifierNode (location: (13,16)-(13,38)) │ ├── expression: │ │ @ CallNode (location: (13,16)-(13,27)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :system @@ -137,14 +138,13 @@ │ │ ├── opening_loc: (13,22)-(13,23) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (13,23)-(13,26)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ LocalVariableReadNode (location: (13,23)-(13,26)) - │ │ │ │ ├── name: :cmd - │ │ │ │ └── depth: 0 - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ LocalVariableReadNode (location: (13,23)-(13,26)) + │ │ │ ├── name: :cmd + │ │ │ └── depth: 0 │ │ ├── closing_loc: (13,26)-(13,27) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── keyword_loc: (13,28)-(13,34) = "rescue" │ └── rescue_expression: │ @ NilNode (location: (13,35)-(13,38)) diff --git a/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt b/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt index 3d80dc144b..0e07d3e05c 100644 --- a/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt +++ b/test/prism/snapshots/seattlerb/defs_as_arg_with_do_block_inside.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,30)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,30)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :p @@ -11,52 +12,51 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,30)) - │ ├── arguments: (length: 1) - │ │ └── @ DefNode (location: (1,2)-(1,30)) - │ │ ├── name: :b - │ │ ├── name_loc: (1,11)-(1,12) = "b" - │ │ ├── receiver: - │ │ │ @ SelfNode (location: (1,6)-(1,10)) - │ │ ├── parameters: ∅ - │ │ ├── body: - │ │ │ @ StatementsNode (location: (1,14)-(1,25)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (1,14)-(1,25)) - │ │ │ ├── receiver: - │ │ │ │ @ CallNode (location: (1,14)-(1,15)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :x - │ │ │ │ ├── message_loc: (1,14)-(1,15) = "x" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── call_operator_loc: (1,15)-(1,16) = "." - │ │ │ ├── name: :y - │ │ │ ├── message_loc: (1,16)-(1,17) = "y" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: - │ │ │ │ @ BlockNode (location: (1,18)-(1,25)) - │ │ │ │ ├── locals: [] - │ │ │ │ ├── locals_body_index: 0 - │ │ │ │ ├── parameters: ∅ - │ │ │ │ ├── body: ∅ - │ │ │ │ ├── opening_loc: (1,18)-(1,20) = "do" - │ │ │ │ └── closing_loc: (1,22)-(1,25) = "end" - │ │ │ └── flags: ∅ - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── def_keyword_loc: (1,2)-(1,5) = "def" - │ │ ├── operator_loc: (1,10)-(1,11) = "." - │ │ ├── lparen_loc: ∅ - │ │ ├── rparen_loc: ∅ - │ │ ├── equal_loc: ∅ - │ │ └── end_keyword_loc: (1,27)-(1,30) = "end" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ DefNode (location: (1,2)-(1,30)) + │ ├── name: :b + │ ├── name_loc: (1,11)-(1,12) = "b" + │ ├── receiver: + │ │ @ SelfNode (location: (1,6)-(1,10)) + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (1,14)-(1,25)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (1,14)-(1,25)) + │ │ ├── flags: ∅ + │ │ ├── receiver: + │ │ │ @ CallNode (location: (1,14)-(1,15)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :x + │ │ │ ├── message_loc: (1,14)-(1,15) = "x" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── call_operator_loc: (1,15)-(1,16) = "." + │ │ ├── name: :y + │ │ ├── message_loc: (1,16)-(1,17) = "y" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: + │ │ @ BlockNode (location: (1,18)-(1,25)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── parameters: ∅ + │ │ ├── body: ∅ + │ │ ├── opening_loc: (1,18)-(1,20) = "do" + │ │ └── closing_loc: (1,22)-(1,25) = "end" + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── def_keyword_loc: (1,2)-(1,5) = "def" + │ ├── operator_loc: (1,10)-(1,11) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (1,27)-(1,30) = "end" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/defs_endless_command.txt b/test/prism/snapshots/seattlerb/defs_endless_command.txt index 873a8dd2ec..b9d926662a 100644 --- a/test/prism/snapshots/seattlerb/defs_endless_command.txt +++ b/test/prism/snapshots/seattlerb/defs_endless_command.txt @@ -8,6 +8,7 @@ ├── name_loc: (1,6)-(1,17) = "some_method" ├── receiver: │ @ CallNode (location: (1,4)-(1,5)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :x @@ -15,13 +16,13 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── parameters: ∅ ├── body: │ @ StatementsNode (location: (1,20)-(1,35)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,20)-(1,35)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :other_method @@ -29,13 +30,12 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,33)-(1,35)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,33)-(1,35)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,33)-(1,35)) + │ │ └── flags: decimal │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [] ├── locals_body_index: 0 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt index a066466ec8..0ac0ca2479 100644 --- a/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt +++ b/test/prism/snapshots/seattlerb/defs_endless_command_rescue.txt @@ -8,6 +8,7 @@ ├── name_loc: (1,6)-(1,17) = "some_method" ├── receiver: │ @ CallNode (location: (1,4)-(1,5)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :x @@ -15,8 +16,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── parameters: ∅ ├── body: │ @ StatementsNode (location: (1,20)-(1,45)) @@ -24,6 +24,7 @@ │ └── @ RescueModifierNode (location: (1,20)-(1,45)) │ ├── expression: │ │ @ CallNode (location: (1,20)-(1,35)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :other_method @@ -31,13 +32,12 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (1,33)-(1,35)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (1,33)-(1,35)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (1,33)-(1,35)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── keyword_loc: (1,36)-(1,42) = "rescue" │ └── rescue_expression: │ @ IntegerNode (location: (1,43)-(1,45)) diff --git a/test/prism/snapshots/seattlerb/defs_oneliner.txt b/test/prism/snapshots/seattlerb/defs_oneliner.txt index fdab8085c3..e7f981c895 100644 --- a/test/prism/snapshots/seattlerb/defs_oneliner.txt +++ b/test/prism/snapshots/seattlerb/defs_oneliner.txt @@ -23,6 +23,7 @@ │ @ StatementsNode (location: (1,21)-(1,32)) │ └── body: (length: 1) │ └── @ CallNode (location: (1,21)-(1,32)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :system @@ -30,14 +31,13 @@ │ ├── opening_loc: (1,27)-(1,28) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,28)-(1,31)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ LocalVariableReadNode (location: (1,28)-(1,31)) - │ │ │ ├── name: :cmd - │ │ │ └── depth: 0 - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LocalVariableReadNode (location: (1,28)-(1,31)) + │ │ ├── name: :cmd + │ │ └── depth: 0 │ ├── closing_loc: (1,31)-(1,32) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── locals: [:cmd] ├── locals_body_index: 1 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt index b0f2f85216..e5acf45e76 100644 --- a/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt +++ b/test/prism/snapshots/seattlerb/defs_oneliner_rescue.txt @@ -26,6 +26,7 @@ │ │ │ @ StatementsNode (location: (2,2)-(2,13)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (2,2)-(2,13)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :system @@ -33,14 +34,13 @@ │ │ │ ├── opening_loc: (2,8)-(2,9) = "(" │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (2,9)-(2,12)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12)) - │ │ │ │ │ ├── name: :cmd - │ │ │ │ │ └── depth: 0 - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ LocalVariableReadNode (location: (2,9)-(2,12)) + │ │ │ │ ├── name: :cmd + │ │ │ │ └── depth: 0 │ │ │ ├── closing_loc: (2,12)-(2,13) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── rescue_clause: │ │ │ @ RescueNode (location: (3,0)-(4,5)) │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue" @@ -85,6 +85,7 @@ │ │ └── @ RescueModifierNode (location: (9,2)-(9,24)) │ │ ├── expression: │ │ │ @ CallNode (location: (9,2)-(9,13)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :system @@ -92,14 +93,13 @@ │ │ │ ├── opening_loc: (9,8)-(9,9) = "(" │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (9,9)-(9,12)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12)) - │ │ │ │ │ ├── name: :cmd - │ │ │ │ │ └── depth: 0 - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ LocalVariableReadNode (location: (9,9)-(9,12)) + │ │ │ │ ├── name: :cmd + │ │ │ │ └── depth: 0 │ │ │ ├── closing_loc: (9,12)-(9,13) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── keyword_loc: (9,14)-(9,20) = "rescue" │ │ └── rescue_expression: │ │ @ NilNode (location: (9,21)-(9,24)) @@ -133,6 +133,7 @@ │ └── @ RescueModifierNode (location: (13,21)-(13,43)) │ ├── expression: │ │ @ CallNode (location: (13,21)-(13,32)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :system @@ -140,14 +141,13 @@ │ │ ├── opening_loc: (13,27)-(13,28) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (13,28)-(13,31)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ LocalVariableReadNode (location: (13,28)-(13,31)) - │ │ │ │ ├── name: :cmd - │ │ │ │ └── depth: 0 - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ LocalVariableReadNode (location: (13,28)-(13,31)) + │ │ │ ├── name: :cmd + │ │ │ └── depth: 0 │ │ ├── closing_loc: (13,31)-(13,32) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── keyword_loc: (13,33)-(13,39) = "rescue" │ └── rescue_expression: │ @ NilNode (location: (13,40)-(13,43)) diff --git a/test/prism/snapshots/seattlerb/difficult0_.txt b/test/prism/snapshots/seattlerb/difficult0_.txt index 1810fa0dae..d5b6a87c1e 100644 --- a/test/prism/snapshots/seattlerb/difficult0_.txt +++ b/test/prism/snapshots/seattlerb/difficult0_.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(4,8)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :p @@ -11,62 +12,61 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(4,8)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,2)-(4,8)) - │ │ ├── receiver: - │ │ │ @ CallNode (location: (1,2)-(4,4)) - │ │ │ ├── receiver: - │ │ │ │ @ StringNode (location: (1,2)-(1,8)) - │ │ │ │ ├── flags: ∅ - │ │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<-END" - │ │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n" - │ │ │ │ ├── closing_loc: (3,0)-(4,0) = " END\n" - │ │ │ │ └── unescaped: " a\n" - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :+ - │ │ │ ├── message_loc: (1,8)-(1,9) = "+" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: - │ │ │ │ @ ArgumentsNode (location: (1,9)-(4,4)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ InterpolatedStringNode (location: (1,9)-(4,4)) - │ │ │ │ │ ├── opening_loc: (1,9)-(1,10) = "'" - │ │ │ │ │ ├── parts: (length: 2) - │ │ │ │ │ │ ├── @ StringNode (location: (1,10)-(2,0)) - │ │ │ │ │ │ │ ├── flags: ∅ - │ │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ │ ├── content_loc: (1,10)-(2,0) = "b\n" - │ │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ │ └── unescaped: "b\n" - │ │ │ │ │ │ └── @ StringNode (location: (4,0)-(4,3)) - │ │ │ │ │ │ ├── flags: ∅ - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── content_loc: (4,0)-(4,3) = " c" - │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ └── unescaped: " c" - │ │ │ │ │ └── closing_loc: (4,3)-(4,4) = "'" - │ │ │ │ └── flags: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :+ - │ │ ├── message_loc: (4,4)-(4,5) = "+" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (4,5)-(4,8)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ StringNode (location: (4,5)-(4,8)) - │ │ │ │ ├── flags: ∅ - │ │ │ │ ├── opening_loc: (4,5)-(4,6) = "'" - │ │ │ │ ├── content_loc: (4,6)-(4,7) = "d" - │ │ │ │ ├── closing_loc: (4,7)-(4,8) = "'" - │ │ │ │ └── unescaped: "d" - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,2)-(4,8)) + │ ├── flags: ∅ + │ ├── receiver: + │ │ @ CallNode (location: (1,2)-(4,4)) + │ │ ├── flags: ∅ + │ │ ├── receiver: + │ │ │ @ StringNode (location: (1,2)-(1,8)) + │ │ │ ├── flags: ∅ + │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<-END" + │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n" + │ │ │ ├── closing_loc: (3,0)-(4,0) = " END\n" + │ │ │ └── unescaped: " a\n" + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :+ + │ │ ├── message_loc: (1,8)-(1,9) = "+" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: + │ │ │ @ ArgumentsNode (location: (1,9)-(4,4)) + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ InterpolatedStringNode (location: (1,9)-(4,4)) + │ │ │ ├── opening_loc: (1,9)-(1,10) = "'" + │ │ │ ├── parts: (length: 2) + │ │ │ │ ├── @ StringNode (location: (1,10)-(2,0)) + │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ │ ├── content_loc: (1,10)-(2,0) = "b\n" + │ │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ │ └── unescaped: "b\n" + │ │ │ │ └── @ StringNode (location: (4,0)-(4,3)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── content_loc: (4,0)-(4,3) = " c" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: " c" + │ │ │ └── closing_loc: (4,3)-(4,4) = "'" + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :+ + │ ├── message_loc: (4,4)-(4,5) = "+" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (4,5)-(4,8)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (4,5)-(4,8)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (4,5)-(4,6) = "'" + │ │ ├── content_loc: (4,6)-(4,7) = "d" + │ │ ├── closing_loc: (4,7)-(4,8) = "'" + │ │ └── unescaped: "d" + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt b/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt index 17a7a3cb68..646a365ef0 100644 --- a/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt +++ b/test/prism/snapshots/seattlerb/difficult1_line_numbers.txt @@ -12,6 +12,7 @@ │ @ StatementsNode (location: (2,2)-(11,11)) │ └── body: (length: 10) │ ├── @ CallNode (location: (2,2)-(2,5)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :p @@ -19,16 +20,17 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (2,4)-(2,5)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (2,4)-(2,5)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (2,4)-(2,5)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (3,2)-(3,7)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (3,2)-(3,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :a @@ -36,24 +38,24 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (3,3)-(3,4) = "." │ │ ├── name: :b │ │ ├── message_loc: (3,4)-(3,5) = "b" │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (3,6)-(3,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (3,6)-(3,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (3,6)-(3,7)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (4,2)-(4,10)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (4,2)-(4,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :c @@ -61,26 +63,26 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (4,3)-(4,4) = "." │ │ ├── name: :d │ │ ├── message_loc: (4,4)-(4,5) = "d" │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (4,6)-(4,10)) - │ │ │ ├── arguments: (length: 2) - │ │ │ │ ├── @ IntegerNode (location: (4,6)-(4,7)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── @ IntegerNode (location: (4,9)-(4,10)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 2) + │ │ │ ├── @ IntegerNode (location: (4,6)-(4,7)) + │ │ │ │ └── flags: decimal + │ │ │ └── @ IntegerNode (location: (4,9)-(4,10)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (5,2)-(5,7)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (5,2)-(5,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :e @@ -88,24 +90,24 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (5,3)-(5,4) = "." │ │ ├── name: :f │ │ ├── message_loc: (5,4)-(5,5) = "f" │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (5,6)-(5,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (5,6)-(5,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (5,6)-(5,7)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (6,2)-(6,10)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (6,2)-(6,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :g @@ -113,24 +115,23 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (6,3)-(6,4) = "." │ │ ├── name: :h │ │ ├── message_loc: (6,4)-(6,5) = "h" │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (6,6)-(6,10)) - │ │ │ ├── arguments: (length: 2) - │ │ │ │ ├── @ IntegerNode (location: (6,6)-(6,7)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── @ IntegerNode (location: (6,9)-(6,10)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 2) + │ │ │ ├── @ IntegerNode (location: (6,6)-(6,7)) + │ │ │ │ └── flags: decimal + │ │ │ └── @ IntegerNode (location: (6,9)-(6,10)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (7,2)-(7,6)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :p @@ -138,16 +139,17 @@ │ │ ├── opening_loc: (7,3)-(7,4) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (7,4)-(7,5)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (7,4)-(7,5)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (7,4)-(7,5)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: (7,5)-(7,6) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (8,2)-(8,8)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (8,2)-(8,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :a @@ -155,24 +157,24 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (8,3)-(8,4) = "." │ │ ├── name: :b │ │ ├── message_loc: (8,4)-(8,5) = "b" │ │ ├── opening_loc: (8,5)-(8,6) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (8,6)-(8,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (8,6)-(8,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (8,6)-(8,7)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: (8,7)-(8,8) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (9,2)-(9,11)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (9,2)-(9,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :c @@ -180,26 +182,26 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (9,3)-(9,4) = "." │ │ ├── name: :d │ │ ├── message_loc: (9,4)-(9,5) = "d" │ │ ├── opening_loc: (9,5)-(9,6) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (9,6)-(9,10)) - │ │ │ ├── arguments: (length: 2) - │ │ │ │ ├── @ IntegerNode (location: (9,6)-(9,7)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── @ IntegerNode (location: (9,9)-(9,10)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 2) + │ │ │ ├── @ IntegerNode (location: (9,6)-(9,7)) + │ │ │ │ └── flags: decimal + │ │ │ └── @ IntegerNode (location: (9,9)-(9,10)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: (9,10)-(9,11) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ CallNode (location: (10,2)-(10,8)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (10,2)-(10,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :e @@ -207,24 +209,24 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (10,3)-(10,4) = "." │ │ ├── name: :f │ │ ├── message_loc: (10,4)-(10,5) = "f" │ │ ├── opening_loc: (10,5)-(10,6) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (10,6)-(10,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (10,6)-(10,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (10,6)-(10,7)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: (10,7)-(10,8) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ └── @ CallNode (location: (11,2)-(11,11)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (11,2)-(11,3)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :g @@ -232,22 +234,20 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (11,3)-(11,4) = "." │ ├── name: :h │ ├── message_loc: (11,4)-(11,5) = "h" │ ├── opening_loc: (11,5)-(11,6) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (11,6)-(11,10)) - │ │ ├── arguments: (length: 2) - │ │ │ ├── @ IntegerNode (location: (11,6)-(11,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── @ IntegerNode (location: (11,9)-(11,10)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 2) + │ │ ├── @ IntegerNode (location: (11,6)-(11,7)) + │ │ │ └── flags: decimal + │ │ └── @ IntegerNode (location: (11,9)-(11,10)) + │ │ └── flags: decimal │ ├── closing_loc: (11,10)-(11,11) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── consequent: ∅ └── end_keyword_loc: (12,0)-(12,3) = "end" diff --git a/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt b/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt index f44437480f..4d23cd5efe 100644 --- a/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt +++ b/test/prism/snapshots/seattlerb/difficult1_line_numbers2.txt @@ -12,6 +12,7 @@ │ │ @ StatementsNode (location: (2,2)-(5,6)) │ │ └── body: (length: 4) │ │ ├── @ CallNode (location: (2,2)-(2,8)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :p @@ -19,17 +20,16 @@ │ │ │ ├── opening_loc: (2,3)-(2,4) = "(" │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (2,4)-(2,7)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ StringNode (location: (2,4)-(2,7)) - │ │ │ │ │ ├── flags: ∅ - │ │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\"" - │ │ │ │ │ ├── content_loc: (2,5)-(2,6) = "a" - │ │ │ │ │ ├── closing_loc: (2,6)-(2,7) = "\"" - │ │ │ │ │ └── unescaped: "a" - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ StringNode (location: (2,4)-(2,7)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\"" + │ │ │ │ ├── content_loc: (2,5)-(2,6) = "a" + │ │ │ │ ├── closing_loc: (2,6)-(2,7) = "\"" + │ │ │ │ └── unescaped: "a" │ │ │ ├── closing_loc: (2,7)-(2,8) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── @ LocalVariableWriteNode (location: (3,2)-(3,7)) │ │ │ ├── name: :b │ │ │ ├── depth: 0 @@ -39,6 +39,7 @@ │ │ │ │ └── flags: decimal │ │ │ └── operator_loc: (3,4)-(3,5) = "=" │ │ ├── @ CallNode (location: (4,2)-(4,5)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :p @@ -46,14 +47,13 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (4,4)-(4,5)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ LocalVariableReadNode (location: (4,4)-(4,5)) - │ │ │ │ │ ├── name: :b - │ │ │ │ │ └── depth: 0 - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ LocalVariableReadNode (location: (4,4)-(4,5)) + │ │ │ │ ├── name: :b + │ │ │ │ └── depth: 0 │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ └── @ LocalVariableWriteNode (location: (5,2)-(5,6)) │ │ ├── name: :c │ │ ├── depth: 0 @@ -65,6 +65,7 @@ │ ├── consequent: ∅ │ └── end_keyword_loc: (6,0)-(6,3) = "end" └── @ CallNode (location: (7,0)-(7,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -72,5 +73,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/difficult2_.txt b/test/prism/snapshots/seattlerb/difficult2_.txt index 599c784501..4d5b3ab528 100644 --- a/test/prism/snapshots/seattlerb/difficult2_.txt +++ b/test/prism/snapshots/seattlerb/difficult2_.txt @@ -13,6 +13,7 @@ │ │ @ StatementsNode (location: (1,4)-(1,9)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (1,4)-(1,9)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -20,17 +21,16 @@ │ │ ├── opening_loc: (1,5)-(1,6) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (1,6)-(1,8)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ StringNode (location: (1,6)-(1,8)) - │ │ │ │ ├── flags: ∅ - │ │ │ │ ├── opening_loc: (1,6)-(1,7) = "'" - │ │ │ │ ├── content_loc: (1,7)-(1,7) = "" - │ │ │ │ ├── closing_loc: (1,7)-(1,8) = "'" - │ │ │ │ └── unescaped: "" - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ StringNode (location: (1,6)-(1,8)) + │ │ │ ├── flags: ∅ + │ │ │ ├── opening_loc: (1,6)-(1,7) = "'" + │ │ │ ├── content_loc: (1,7)-(1,7) = "" + │ │ │ ├── closing_loc: (1,7)-(1,8) = "'" + │ │ │ └── unescaped: "" │ │ ├── closing_loc: (1,8)-(1,9) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── consequent: │ │ @ ElseNode (location: (1,10)-(1,13)) │ │ ├── else_keyword_loc: (1,10)-(1,11) = ":" @@ -42,6 +42,7 @@ │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ └── @ CallNode (location: (2,0)-(2,6)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -49,21 +50,20 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (2,2)-(2,6)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (2,2)-(2,6)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (2,2)-(2,6)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (2,2)-(2,4)) - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (2,2)-(2,3) = "d" - │ │ │ ├── closing_loc: (2,3)-(2,4) = ":" - │ │ │ └── unescaped: "d" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (2,5)-(2,6)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (2,2)-(2,6)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (2,2)-(2,6)) + │ ├── key: + │ │ @ SymbolNode (location: (2,2)-(2,4)) + │ │ ├── opening_loc: ∅ + │ │ ├── value_loc: (2,2)-(2,3) = "d" + │ │ ├── closing_loc: (2,3)-(2,4) = ":" + │ │ └── unescaped: "d" + │ ├── value: + │ │ @ IntegerNode (location: (2,5)-(2,6)) + │ │ └── flags: decimal + │ └── operator_loc: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/difficult3_.txt b/test/prism/snapshots/seattlerb/difficult3_.txt index 11d687db2b..6a6306c01b 100644 --- a/test/prism/snapshots/seattlerb/difficult3_.txt +++ b/test/prism/snapshots/seattlerb/difficult3_.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,18)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,18)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,18)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,16)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,15)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15)) - │ │ │ │ ├── lefts: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,12)-(1,14)) - │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" - │ │ │ │ │ └── expression: - │ │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,14)-(1,15) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,15)-(1,16) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,17)-(1,18) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,18)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,16)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,15)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15)) + │ │ │ ├── lefts: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,12)-(1,14)) + │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" + │ │ │ │ └── expression: + │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ │ └── name: :c + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,14)-(1,15) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,15)-(1,16) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,17)-(1,18) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3_2.txt b/test/prism/snapshots/seattlerb/difficult3_2.txt index c41903b1b3..753217ca40 100644 --- a/test/prism/snapshots/seattlerb/difficult3_2.txt +++ b/test/prism/snapshots/seattlerb/difficult3_2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,13)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,11)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,10)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,5)-(1,7)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,6)-(1,7) = "a" - │ │ │ │ └── operator_loc: (1,5)-(1,6) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ └── name: :b - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,10)-(1,11) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,12)-(1,13) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,13)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,11)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,10)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,5)-(1,7)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,6)-(1,7) = "a" + │ │ │ └── operator_loc: (1,5)-(1,6) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ └── name: :b + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,10)-(1,11) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,12)-(1,13) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3_3.txt b/test/prism/snapshots/seattlerb/difficult3_3.txt index 883dc77544..eb2e1baf07 100644 --- a/test/prism/snapshots/seattlerb/difficult3_3.txt +++ b/test/prism/snapshots/seattlerb/difficult3_3.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,35 +12,34 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,5)-(1,7)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,6)-(1,7) = "a" - │ │ │ │ └── operator_loc: (1,5)-(1,6) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ └── name: :b - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,12)-(1,14)) - │ │ │ ├── name: :c - │ │ │ ├── name_loc: (1,13)-(1,14) = "c" - │ │ │ └── operator_loc: (1,12)-(1,13) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,5)-(1,7)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,6)-(1,7) = "a" + │ │ │ └── operator_loc: (1,5)-(1,6) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ └── name: :b + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,12)-(1,14)) + │ │ ├── name: :c + │ │ ├── name_loc: (1,13)-(1,14) = "c" + │ │ └── operator_loc: (1,12)-(1,13) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3_4.txt b/test/prism/snapshots/seattlerb/difficult3_4.txt index c23fa784d2..a8be0694c9 100644 --- a/test/prism/snapshots/seattlerb/difficult3_4.txt +++ b/test/prism/snapshots/seattlerb/difficult3_4.txt @@ -12,6 +12,7 @@ │ ├── if_keyword_loc: ∅ │ ├── predicate: │ │ @ CallNode (location: (1,2)-(1,3)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -19,8 +20,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── then_keyword_loc: (1,4)-(1,5) = "?" │ ├── statements: │ │ @ StatementsNode (location: (1,6)-(1,10)) diff --git a/test/prism/snapshots/seattlerb/difficult3_5.txt b/test/prism/snapshots/seattlerb/difficult3_5.txt index 8f33ebb1ae..c9fa99bf61 100644 --- a/test/prism/snapshots/seattlerb/difficult3_5.txt +++ b/test/prism/snapshots/seattlerb/difficult3_5.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,19)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,19)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,19)) - │ ├── arguments: (length: 1) - │ │ └── @ LambdaNode (location: (1,2)-(1,19)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── operator_loc: (1,2)-(1,4) = "->" - │ │ ├── opening_loc: (1,7)-(1,8) = "{" - │ │ ├── closing_loc: (1,18)-(1,19) = "}" - │ │ ├── parameters: - │ │ │ @ BlockParametersNode (location: (1,4)-(1,6)) - │ │ │ ├── parameters: ∅ - │ │ │ ├── locals: (length: 0) - │ │ │ ├── opening_loc: (1,4)-(1,5) = "(" - │ │ │ └── closing_loc: (1,5)-(1,6) = ")" - │ │ └── body: - │ │ @ StatementsNode (location: (1,9)-(1,17)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (1,9)-(1,17)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :g - │ │ ├── message_loc: (1,9)-(1,10) = "g" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: - │ │ │ @ BlockNode (location: (1,11)-(1,17)) - │ │ │ ├── locals: [] - │ │ │ ├── locals_body_index: 0 - │ │ │ ├── parameters: ∅ - │ │ │ ├── body: ∅ - │ │ │ ├── opening_loc: (1,11)-(1,13) = "do" - │ │ │ └── closing_loc: (1,14)-(1,17) = "end" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LambdaNode (location: (1,2)-(1,19)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── operator_loc: (1,2)-(1,4) = "->" + │ ├── opening_loc: (1,7)-(1,8) = "{" + │ ├── closing_loc: (1,18)-(1,19) = "}" + │ ├── parameters: + │ │ @ BlockParametersNode (location: (1,4)-(1,6)) + │ │ ├── parameters: ∅ + │ │ ├── locals: (length: 0) + │ │ ├── opening_loc: (1,4)-(1,5) = "(" + │ │ └── closing_loc: (1,5)-(1,6) = ")" + │ └── body: + │ @ StatementsNode (location: (1,9)-(1,17)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (1,9)-(1,17)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :g + │ ├── message_loc: (1,9)-(1,10) = "g" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: + │ @ BlockNode (location: (1,11)-(1,17)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (1,11)-(1,13) = "do" + │ └── closing_loc: (1,14)-(1,17) = "end" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/difficult3__10.txt b/test/prism/snapshots/seattlerb/difficult3__10.txt index c85aaa66b8..8b972ebd6f 100644 --- a/test/prism/snapshots/seattlerb/difficult3__10.txt +++ b/test/prism/snapshots/seattlerb/difficult3__10.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,18)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,18)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,18)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,16)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,15)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15)) - │ │ │ │ ├── lefts: (length: 0) - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) - │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" - │ │ │ │ │ └── expression: - │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rights: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,14)-(1,15) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,15)-(1,16) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,17)-(1,18) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,18)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,16)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,15)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,15)) + │ │ │ ├── lefts: (length: 0) + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) + │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" + │ │ │ │ └── expression: + │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ │ └── name: :b + │ │ │ ├── rights: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ │ └── name: :c + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,14)-(1,15) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,15)-(1,16) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,17)-(1,18) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3__11.txt b/test/prism/snapshots/seattlerb/difficult3__11.txt index 5c646b7196..11652bba93 100644 --- a/test/prism/snapshots/seattlerb/difficult3__11.txt +++ b/test/prism/snapshots/seattlerb/difficult3__11.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,36 +12,35 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,14)) - │ ├── locals: [:a] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,11)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,11)) - │ │ │ │ ├── lefts: (length: 0) - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,9)-(1,10)) - │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" - │ │ │ │ │ └── expression: ∅ - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,13)-(1,14) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,14)) + ├── locals: [:a] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,11)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,11)) + │ │ │ ├── lefts: (length: 0) + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,9)-(1,10)) + │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" + │ │ │ │ └── expression: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,13)-(1,14) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3__12.txt b/test/prism/snapshots/seattlerb/difficult3__12.txt index d6a1701b17..388fdc8335 100644 --- a/test/prism/snapshots/seattlerb/difficult3__12.txt +++ b/test/prism/snapshots/seattlerb/difficult3__12.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14)) - │ │ │ │ ├── lefts: (length: 0) - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,9)-(1,10)) - │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" - │ │ │ │ │ └── expression: ∅ - │ │ │ │ ├── rights: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14)) + │ │ │ ├── lefts: (length: 0) + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,9)-(1,10)) + │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" + │ │ │ │ └── expression: ∅ + │ │ │ ├── rights: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) + │ │ │ │ └── name: :b + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3__6.txt b/test/prism/snapshots/seattlerb/difficult3__6.txt index 7761d844f1..960aec5da9 100644 --- a/test/prism/snapshots/seattlerb/difficult3__6.txt +++ b/test/prism/snapshots/seattlerb/difficult3__6.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,21)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,21)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,42 +12,41 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,21)) - │ ├── locals: [:a, :b, :c, :d] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,19)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,18)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,18)) - │ │ │ │ ├── lefts: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,12)-(1,14)) - │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" - │ │ │ │ │ └── expression: - │ │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── rights: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17)) - │ │ │ │ │ └── name: :d - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,17)-(1,18) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,18)-(1,19) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,20)-(1,21) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,21)) + ├── locals: [:a, :b, :c, :d] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,19)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,18)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,18)) + │ │ │ ├── lefts: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,12)-(1,14)) + │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" + │ │ │ │ └── expression: + │ │ │ │ @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ │ └── name: :c + │ │ │ ├── rights: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17)) + │ │ │ │ └── name: :d + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,17)-(1,18) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,18)-(1,19) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,20)-(1,21) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3__7.txt b/test/prism/snapshots/seattlerb/difficult3__7.txt index 8d175ea863..8fdc3f4a90 100644 --- a/test/prism/snapshots/seattlerb/difficult3__7.txt +++ b/test/prism/snapshots/seattlerb/difficult3__7.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14)) - │ │ │ │ ├── lefts: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,12)-(1,13)) - │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" - │ │ │ │ │ └── expression: ∅ - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,14)) + │ │ │ ├── lefts: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,12)-(1,13)) + │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" + │ │ │ │ └── expression: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3__8.txt b/test/prism/snapshots/seattlerb/difficult3__8.txt index a0ec0ae934..4d18fd9453 100644 --- a/test/prism/snapshots/seattlerb/difficult3__8.txt +++ b/test/prism/snapshots/seattlerb/difficult3__8.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,20)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,20)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,20)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,18)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,17)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,17)) - │ │ │ │ ├── lefts: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,12)-(1,13)) - │ │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" - │ │ │ │ │ └── expression: ∅ - │ │ │ │ ├── rights: (length: 1) - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16)) - │ │ │ │ │ └── name: :c - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,16)-(1,17) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,17)-(1,18) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,19)-(1,20) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,20)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,18)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,17)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,17)) + │ │ │ ├── lefts: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,12)-(1,13)) + │ │ │ │ ├── operator_loc: (1,12)-(1,13) = "*" + │ │ │ │ └── expression: ∅ + │ │ │ ├── rights: (length: 1) + │ │ │ │ └── @ RequiredParameterNode (location: (1,15)-(1,16)) + │ │ │ │ └── name: :c + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,16)-(1,17) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,17)-(1,18) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,19)-(1,20) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult3__9.txt b/test/prism/snapshots/seattlerb/difficult3__9.txt index 37d05acb84..97de361cb7 100644 --- a/test/prism/snapshots/seattlerb/difficult3__9.txt +++ b/test/prism/snapshots/seattlerb/difficult3__9.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,15)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,15)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,15)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,13)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,12)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,12)) - │ │ │ │ ├── lefts: (length: 0) - │ │ │ │ ├── rest: - │ │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) - │ │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" - │ │ │ │ │ └── expression: - │ │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,12)-(1,13) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,14)-(1,15) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,15)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,13)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,12)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ MultiTargetNode (location: (1,8)-(1,12)) + │ │ │ ├── lefts: (length: 0) + │ │ │ ├── rest: + │ │ │ │ @ SplatNode (location: (1,9)-(1,11)) + │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "*" + │ │ │ │ └── expression: + │ │ │ │ @ RequiredParameterNode (location: (1,10)-(1,11)) + │ │ │ │ └── name: :b + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ └── rparen_loc: (1,11)-(1,12) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,12)-(1,13) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,14)-(1,15) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt b/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt index e174cf39c0..f340c624d9 100644 --- a/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt +++ b/test/prism/snapshots/seattlerb/difficult4__leading_dots.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(2,2)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(2,2)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (2,0)-(2,1) = "." ├── name: :b ├── message_loc: (2,1)-(2,2) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt b/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt index e569fbea1f..c5868e193c 100644 --- a/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt +++ b/test/prism/snapshots/seattlerb/difficult4__leading_dots2.txt @@ -6,9 +6,9 @@ ├── @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal └── @ RangeNode (location: (2,0)-(2,3)) + ├── flags: ∅ ├── left: ∅ ├── right: │ @ IntegerNode (location: (2,2)-(2,3)) │ └── flags: decimal - ├── operator_loc: (2,0)-(2,2) = ".." - └── flags: ∅ + └── operator_loc: (2,0)-(2,2) = ".." diff --git a/test/prism/snapshots/seattlerb/difficult6_.txt b/test/prism/snapshots/seattlerb/difficult6_.txt index 71e92dcee5..a99969f51a 100644 --- a/test/prism/snapshots/seattlerb/difficult6_.txt +++ b/test/prism/snapshots/seattlerb/difficult6_.txt @@ -35,6 +35,7 @@ @ StatementsNode (location: (1,15)-(1,23)) └── body: (length: 1) └── @ CallNode (location: (1,15)-(1,23)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :p @@ -42,19 +43,18 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,17)-(1,23)) - │ ├── arguments: (length: 1) - │ │ └── @ ArrayNode (location: (1,17)-(1,23)) - │ │ ├── elements: (length: 2) - │ │ │ ├── @ LocalVariableReadNode (location: (1,18)-(1,19)) - │ │ │ │ ├── name: :a - │ │ │ │ └── depth: 0 - │ │ │ └── @ LocalVariableReadNode (location: (1,21)-(1,22)) - │ │ │ ├── name: :b - │ │ │ └── depth: 0 - │ │ ├── opening_loc: (1,17)-(1,18) = "[" - │ │ ├── closing_loc: (1,22)-(1,23) = "]" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ArrayNode (location: (1,17)-(1,23)) + │ ├── flags: ∅ + │ ├── elements: (length: 2) + │ │ ├── @ LocalVariableReadNode (location: (1,18)-(1,19)) + │ │ │ ├── name: :a + │ │ │ └── depth: 0 + │ │ └── @ LocalVariableReadNode (location: (1,21)-(1,22)) + │ │ ├── name: :b + │ │ └── depth: 0 + │ ├── opening_loc: (1,17)-(1,18) = "[" + │ └── closing_loc: (1,22)-(1,23) = "]" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/difficult6__7.txt b/test/prism/snapshots/seattlerb/difficult6__7.txt index f7331b87e4..ce48b01a4c 100644 --- a/test/prism/snapshots/seattlerb/difficult6__7.txt +++ b/test/prism/snapshots/seattlerb/difficult6__7.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,43 +15,41 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :b ├── message_loc: (1,2)-(1,3) = "b" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,7)) - │ ├── arguments: (length: 1) - │ │ └── @ ParenthesesNode (location: (1,4)-(1,7)) - │ │ ├── body: - │ │ │ @ StatementsNode (location: (1,5)-(1,6)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ │ └── flags: decimal - │ │ ├── opening_loc: (1,4)-(1,5) = "(" - │ │ └── closing_loc: (1,6)-(1,7) = ")" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ParenthesesNode (location: (1,4)-(1,7)) + │ ├── body: + │ │ @ StatementsNode (location: (1,5)-(1,6)) + │ │ └── body: (length: 1) + │ │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ │ └── flags: decimal + │ ├── opening_loc: (1,4)-(1,5) = "(" + │ └── closing_loc: (1,6)-(1,7) = ")" ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,8)-(1,11)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ StatementsNode (location: (1,9)-(1,10)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (1,9)-(1,10)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :c - │ │ ├── message_loc: (1,9)-(1,10) = "c" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── opening_loc: (1,8)-(1,9) = "{" - │ └── closing_loc: (1,10)-(1,11) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,8)-(1,11)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ StatementsNode (location: (1,9)-(1,10)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (1,9)-(1,10)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :c + │ ├── message_loc: (1,9)-(1,10) = "c" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,8)-(1,9) = "{" + └── closing_loc: (1,10)-(1,11) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult6__8.txt b/test/prism/snapshots/seattlerb/difficult6__8.txt index a08c5eccc5..22b3c3cec3 100644 --- a/test/prism/snapshots/seattlerb/difficult6__8.txt +++ b/test/prism/snapshots/seattlerb/difficult6__8.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,12)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,12)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,43 +15,41 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "::" ├── name: :b ├── message_loc: (1,3)-(1,4) = "b" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ ParenthesesNode (location: (1,5)-(1,8)) - │ │ ├── body: - │ │ │ @ StatementsNode (location: (1,6)-(1,7)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ │ └── flags: decimal - │ │ ├── opening_loc: (1,5)-(1,6) = "(" - │ │ └── closing_loc: (1,7)-(1,8) = ")" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ParenthesesNode (location: (1,5)-(1,8)) + │ ├── body: + │ │ @ StatementsNode (location: (1,6)-(1,7)) + │ │ └── body: (length: 1) + │ │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ │ └── flags: decimal + │ ├── opening_loc: (1,5)-(1,6) = "(" + │ └── closing_loc: (1,7)-(1,8) = ")" ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,9)-(1,12)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ StatementsNode (location: (1,10)-(1,11)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (1,10)-(1,11)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :c - │ │ ├── message_loc: (1,10)-(1,11) = "c" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── opening_loc: (1,9)-(1,10) = "{" - │ └── closing_loc: (1,11)-(1,12) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,9)-(1,12)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ StatementsNode (location: (1,10)-(1,11)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (1,10)-(1,11)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :c + │ ├── message_loc: (1,10)-(1,11) = "c" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,9)-(1,10) = "{" + └── closing_loc: (1,11)-(1,12) = "}" diff --git a/test/prism/snapshots/seattlerb/difficult7_.txt b/test/prism/snapshots/seattlerb/difficult7_.txt index 2f8166421c..58da75e77b 100644 --- a/test/prism/snapshots/seattlerb/difficult7_.txt +++ b/test/prism/snapshots/seattlerb/difficult7_.txt @@ -15,6 +15,7 @@ │ │ │ └── unescaped: "a" │ │ ├── value: │ │ │ @ CallNode (location: (2,11)-(2,33)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :lambda @@ -22,62 +23,61 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: - │ │ │ │ @ BlockNode (location: (2,18)-(2,33)) - │ │ │ │ ├── locals: [] - │ │ │ │ ├── locals_body_index: 0 - │ │ │ │ ├── parameters: ∅ - │ │ │ │ ├── body: - │ │ │ │ │ @ StatementsNode (location: (2,20)-(2,31)) - │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ └── @ IfNode (location: (2,20)-(2,31)) - │ │ │ │ │ ├── if_keyword_loc: ∅ - │ │ │ │ │ ├── predicate: - │ │ │ │ │ │ @ CallNode (location: (2,20)-(2,21)) - │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ │ ├── name: :b - │ │ │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b" - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ │ └── flags: variable_call - │ │ │ │ │ ├── then_keyword_loc: (2,22)-(2,23) = "?" - │ │ │ │ │ ├── statements: - │ │ │ │ │ │ @ StatementsNode (location: (2,24)-(2,27)) - │ │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ │ └── @ CallNode (location: (2,24)-(2,27)) - │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ │ ├── name: :c - │ │ │ │ │ │ ├── message_loc: (2,24)-(2,25) = "c" - │ │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "(" - │ │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ │ ├── closing_loc: (2,26)-(2,27) = ")" - │ │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ │ └── flags: ∅ - │ │ │ │ │ ├── consequent: - │ │ │ │ │ │ @ ElseNode (location: (2,28)-(2,31)) - │ │ │ │ │ │ ├── else_keyword_loc: (2,28)-(2,29) = ":" - │ │ │ │ │ │ ├── statements: - │ │ │ │ │ │ │ @ StatementsNode (location: (2,30)-(2,31)) - │ │ │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ │ │ └── @ CallNode (location: (2,30)-(2,31)) - │ │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ │ │ ├── name: :d - │ │ │ │ │ │ │ ├── message_loc: (2,30)-(2,31) = "d" - │ │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ │ │ └── flags: variable_call - │ │ │ │ │ │ └── end_keyword_loc: ∅ - │ │ │ │ │ └── end_keyword_loc: ∅ - │ │ │ │ ├── opening_loc: (2,18)-(2,19) = "{" - │ │ │ │ └── closing_loc: (2,32)-(2,33) = "}" - │ │ │ └── flags: ∅ + │ │ │ └── block: + │ │ │ @ BlockNode (location: (2,18)-(2,33)) + │ │ │ ├── locals: [] + │ │ │ ├── locals_body_index: 0 + │ │ │ ├── parameters: ∅ + │ │ │ ├── body: + │ │ │ │ @ StatementsNode (location: (2,20)-(2,31)) + │ │ │ │ └── body: (length: 1) + │ │ │ │ └── @ IfNode (location: (2,20)-(2,31)) + │ │ │ │ ├── if_keyword_loc: ∅ + │ │ │ │ ├── predicate: + │ │ │ │ │ @ CallNode (location: (2,20)-(2,21)) + │ │ │ │ │ ├── flags: variable_call + │ │ │ │ │ ├── receiver: ∅ + │ │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ │ ├── name: :b + │ │ │ │ │ ├── message_loc: (2,20)-(2,21) = "b" + │ │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ │ ├── arguments: ∅ + │ │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ │ └── block: ∅ + │ │ │ │ ├── then_keyword_loc: (2,22)-(2,23) = "?" + │ │ │ │ ├── statements: + │ │ │ │ │ @ StatementsNode (location: (2,24)-(2,27)) + │ │ │ │ │ └── body: (length: 1) + │ │ │ │ │ └── @ CallNode (location: (2,24)-(2,27)) + │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ ├── receiver: ∅ + │ │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ │ ├── name: :c + │ │ │ │ │ ├── message_loc: (2,24)-(2,25) = "c" + │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "(" + │ │ │ │ │ ├── arguments: ∅ + │ │ │ │ │ ├── closing_loc: (2,26)-(2,27) = ")" + │ │ │ │ │ └── block: ∅ + │ │ │ │ ├── consequent: + │ │ │ │ │ @ ElseNode (location: (2,28)-(2,31)) + │ │ │ │ │ ├── else_keyword_loc: (2,28)-(2,29) = ":" + │ │ │ │ │ ├── statements: + │ │ │ │ │ │ @ StatementsNode (location: (2,30)-(2,31)) + │ │ │ │ │ │ └── body: (length: 1) + │ │ │ │ │ │ └── @ CallNode (location: (2,30)-(2,31)) + │ │ │ │ │ │ ├── flags: variable_call + │ │ │ │ │ │ ├── receiver: ∅ + │ │ │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ │ │ ├── name: :d + │ │ │ │ │ │ ├── message_loc: (2,30)-(2,31) = "d" + │ │ │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ │ │ ├── arguments: ∅ + │ │ │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ │ │ └── block: ∅ + │ │ │ │ │ └── end_keyword_loc: ∅ + │ │ │ │ └── end_keyword_loc: ∅ + │ │ │ ├── opening_loc: (2,18)-(2,19) = "{" + │ │ │ └── closing_loc: (2,32)-(2,33) = "}" │ │ └── operator_loc: ∅ │ └── @ AssocNode (location: (3,8)-(3,14)) │ ├── key: diff --git a/test/prism/snapshots/seattlerb/do_bug.txt b/test/prism/snapshots/seattlerb/do_bug.txt index 4ef29b5a2e..be64a43e0d 100644 --- a/test/prism/snapshots/seattlerb/do_bug.txt +++ b/test/prism/snapshots/seattlerb/do_bug.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,3)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,3)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,16 +12,17 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,3)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,2)-(1,3)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,2)-(1,3)) + │ │ └── flags: decimal │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (2,0)-(4,3)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (2,0)-(2,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -28,35 +30,33 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (2,1)-(2,2) = "." ├── name: :b ├── message_loc: (2,2)-(2,3) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (2,4)-(4,3)) - │ ├── locals: [:c] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (2,7)-(2,10)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (2,8)-(2,9)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (2,8)-(2,9)) - │ │ │ │ └── name: :c - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (2,7)-(2,8) = "|" - │ │ └── closing_loc: (2,9)-(2,10) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (2,4)-(2,6) = "do" - │ └── closing_loc: (4,0)-(4,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (2,4)-(4,3)) + ├── locals: [:c] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (2,7)-(2,10)) + │ ├── parameters: + │ │ @ ParametersNode (location: (2,8)-(2,9)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (2,8)-(2,9)) + │ │ │ └── name: :c + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (2,7)-(2,8) = "|" + │ └── closing_loc: (2,9)-(2,10) = "|" + ├── body: ∅ + ├── opening_loc: (2,4)-(2,6) = "do" + └── closing_loc: (4,0)-(4,3) = "end" diff --git a/test/prism/snapshots/seattlerb/dot2_nil__26.txt b/test/prism/snapshots/seattlerb/dot2_nil__26.txt index 01a65eab9f..0d73215bc2 100644 --- a/test/prism/snapshots/seattlerb/dot2_nil__26.txt +++ b/test/prism/snapshots/seattlerb/dot2_nil__26.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,3)) └── body: (length: 1) └── @ RangeNode (location: (1,0)-(1,3)) + ├── flags: ∅ ├── left: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,8 +15,6 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── right: ∅ - ├── operator_loc: (1,1)-(1,3) = ".." - └── flags: ∅ + └── operator_loc: (1,1)-(1,3) = ".." diff --git a/test/prism/snapshots/seattlerb/dot3_nil__26.txt b/test/prism/snapshots/seattlerb/dot3_nil__26.txt index be7679ab77..94c873dbb8 100644 --- a/test/prism/snapshots/seattlerb/dot3_nil__26.txt +++ b/test/prism/snapshots/seattlerb/dot3_nil__26.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ RangeNode (location: (1,0)-(1,4)) + ├── flags: exclude_end ├── left: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,8 +15,6 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── right: ∅ - ├── operator_loc: (1,1)-(1,4) = "..." - └── flags: exclude_end + └── operator_loc: (1,1)-(1,4) = "..." diff --git a/test/prism/snapshots/seattlerb/dstr_evstr.txt b/test/prism/snapshots/seattlerb/dstr_evstr.txt index 794e144c65..4c48657914 100644 --- a/test/prism/snapshots/seattlerb/dstr_evstr.txt +++ b/test/prism/snapshots/seattlerb/dstr_evstr.txt @@ -24,6 +24,7 @@ │ │ @ StatementsNode (location: (1,9)-(1,10)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (1,9)-(1,10)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -31,7 +32,6 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── closing_loc: (1,10)-(1,11) = "}" └── closing_loc: (1,11)-(1,12) = "\"" diff --git a/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt b/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt index b3743114ad..65be266f20 100644 --- a/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt +++ b/test/prism/snapshots/seattlerb/dstr_evstr_empty_end.txt @@ -12,6 +12,7 @@ │ │ @ StatementsNode (location: (1,4)-(1,9)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (1,4)-(1,9)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :field @@ -19,7 +20,6 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── closing_loc: (1,9)-(1,10) = "}" └── closing_loc: (1,10)-(1,11) = "\"" diff --git a/test/prism/snapshots/seattlerb/dstr_lex_state.txt b/test/prism/snapshots/seattlerb/dstr_lex_state.txt index 9172daedc7..56264cea05 100644 --- a/test/prism/snapshots/seattlerb/dstr_lex_state.txt +++ b/test/prism/snapshots/seattlerb/dstr_lex_state.txt @@ -12,6 +12,7 @@ │ │ @ StatementsNode (location: (1,3)-(1,6)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (1,3)-(1,6)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :p @@ -19,15 +20,14 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (1,4)-(1,6)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (1,4)-(1,6)) - │ │ │ │ ├── opening_loc: (1,4)-(1,5) = ":" - │ │ │ │ ├── value_loc: (1,5)-(1,6) = "a" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "a" - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ SymbolNode (location: (1,4)-(1,6)) + │ │ │ ├── opening_loc: (1,4)-(1,5) = ":" + │ │ │ ├── value_loc: (1,5)-(1,6) = "a" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "a" │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ └── closing_loc: (1,6)-(1,7) = "}" └── closing_loc: (1,7)-(1,8) = "\"" diff --git a/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt b/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt index bc72255ff4..3b53fee11e 100644 --- a/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt +++ b/test/prism/snapshots/seattlerb/eq_begin_why_wont_people_use_their_spacebar.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(3,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,8)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :h @@ -13,37 +15,35 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :[]= ├── message_loc: (1,1)-(1,4) = "[k]" ├── opening_loc: (1,1)-(1,2) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(3,8)) - │ ├── arguments: (length: 2) - │ │ ├── @ CallNode (location: (1,2)-(1,3)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :k - │ │ │ ├── message_loc: (1,2)-(1,3) = "k" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── @ BeginNode (location: (1,5)-(3,8)) - │ │ ├── begin_keyword_loc: (1,5)-(1,10) = "begin" - │ │ ├── statements: - │ │ │ @ StatementsNode (location: (2,7)-(2,9)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ IntegerNode (location: (2,7)-(2,9)) - │ │ │ └── flags: decimal - │ │ ├── rescue_clause: ∅ - │ │ ├── else_clause: ∅ - │ │ ├── ensure_clause: ∅ - │ │ └── end_keyword_loc: (3,5)-(3,8) = "end" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ CallNode (location: (1,2)-(1,3)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :k + │ │ ├── message_loc: (1,2)-(1,3) = "k" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ └── @ BeginNode (location: (1,5)-(3,8)) + │ ├── begin_keyword_loc: (1,5)-(1,10) = "begin" + │ ├── statements: + │ │ @ StatementsNode (location: (2,7)-(2,9)) + │ │ └── body: (length: 1) + │ │ └── @ IntegerNode (location: (2,7)-(2,9)) + │ │ └── flags: decimal + │ ├── rescue_clause: ∅ + │ ├── else_clause: ∅ + │ ├── ensure_clause: ∅ + │ └── end_keyword_loc: (3,5)-(3,8) = "end" ├── closing_loc: (1,3)-(1,4) = "]" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/evstr_evstr.txt b/test/prism/snapshots/seattlerb/evstr_evstr.txt index 102f21b884..25be925826 100644 --- a/test/prism/snapshots/seattlerb/evstr_evstr.txt +++ b/test/prism/snapshots/seattlerb/evstr_evstr.txt @@ -12,6 +12,7 @@ │ │ │ @ StatementsNode (location: (1,3)-(1,4)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (1,3)-(1,4)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :a @@ -19,8 +20,7 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (1,4)-(1,5) = "}" │ └── @ EmbeddedStatementsNode (location: (1,5)-(1,9)) │ ├── opening_loc: (1,5)-(1,7) = "\#{" @@ -28,6 +28,7 @@ │ │ @ StatementsNode (location: (1,7)-(1,8)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (1,7)-(1,8)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -35,7 +36,6 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── closing_loc: (1,8)-(1,9) = "}" └── closing_loc: (1,9)-(1,10) = "\"" diff --git a/test/prism/snapshots/seattlerb/evstr_str.txt b/test/prism/snapshots/seattlerb/evstr_str.txt index 465f89a028..535881f353 100644 --- a/test/prism/snapshots/seattlerb/evstr_str.txt +++ b/test/prism/snapshots/seattlerb/evstr_str.txt @@ -12,6 +12,7 @@ │ │ │ @ StatementsNode (location: (1,3)-(1,4)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (1,3)-(1,4)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :a @@ -19,8 +20,7 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (1,4)-(1,5) = "}" │ └── @ StringNode (location: (1,5)-(1,7)) │ ├── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/expr_not_bang.txt b/test/prism/snapshots/seattlerb/expr_not_bang.txt index a9bfae7381..dab908c1ee 100644 --- a/test/prism/snapshots/seattlerb/expr_not_bang.txt +++ b/test/prism/snapshots/seattlerb/expr_not_bang.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,2)-(1,5)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,26 +15,24 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,4)-(1,5)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :b - │ │ │ ├── message_loc: (1,4)-(1,5) = "b" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,4)-(1,5)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :b + │ │ ├── message_loc: (1,4)-(1,5) = "b" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :! ├── message_loc: (1,0)-(1,1) = "!" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/flip2_env_lvar.txt b/test/prism/snapshots/seattlerb/flip2_env_lvar.txt index 3cd798e41f..fe3592fd0b 100644 --- a/test/prism/snapshots/seattlerb/flip2_env_lvar.txt +++ b/test/prism/snapshots/seattlerb/flip2_env_lvar.txt @@ -7,8 +7,10 @@ ├── if_keyword_loc: (1,0)-(1,2) = "if" ├── predicate: │ @ FlipFlopNode (location: (1,3)-(1,7)) + │ ├── flags: ∅ │ ├── left: │ │ @ CallNode (location: (1,3)-(1,4)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -16,10 +18,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── right: │ │ @ CallNode (location: (1,6)-(1,7)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -27,10 +29,8 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── operator_loc: (1,4)-(1,6) = ".." - │ └── flags: ∅ + │ │ └── block: ∅ + │ └── operator_loc: (1,4)-(1,6) = ".." ├── then_keyword_loc: (1,8)-(1,12) = "then" ├── statements: ∅ ├── consequent: ∅ diff --git a/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt index c729c67ce8..888ebc809a 100644 --- a/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt +++ b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(7,1)) └── body: (length: 2) ├── @ ArrayNode (location: (1,0)-(2,3)) + │ ├── flags: ∅ │ ├── elements: (length: 1) │ │ └── @ StringNode (location: (1,1)-(2,1)) │ │ ├── flags: ∅ @@ -12,9 +13,9 @@ │ │ ├── closing_loc: (2,0)-(2,1) = "\"" │ │ └── unescaped: " some text\n" │ ├── opening_loc: (1,0)-(1,1) = "[" - │ ├── closing_loc: (2,2)-(2,3) = "]" - │ └── flags: ∅ + │ └── closing_loc: (2,2)-(2,3) = "]" └── @ ArrayNode (location: (4,0)-(7,1)) + ├── flags: ∅ ├── elements: (length: 1) │ └── @ StringNode (location: (4,1)-(4,8)) │ ├── flags: ∅ @@ -23,5 +24,4 @@ │ ├── closing_loc: (6,0)-(7,0) = "FILE\n" │ └── unescaped: " some text\n" ├── opening_loc: (4,0)-(4,1) = "[" - ├── closing_loc: (7,0)-(7,1) = "]" - └── flags: ∅ + └── closing_loc: (7,0)-(7,1) = "]" diff --git a/test/prism/snapshots/seattlerb/heredoc_nested.txt b/test/prism/snapshots/seattlerb/heredoc_nested.txt index 0f65b2bd75..fde81dd586 100644 --- a/test/prism/snapshots/seattlerb/heredoc_nested.txt +++ b/test/prism/snapshots/seattlerb/heredoc_nested.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(7,2)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(7,2)) + ├── flags: ∅ ├── elements: (length: 2) │ ├── @ InterpolatedStringNode (location: (1,1)-(1,4)) │ │ ├── opening_loc: (1,1)-(1,4) = "<<A" @@ -36,5 +37,4 @@ │ └── @ IntegerNode (location: (7,0)-(7,1)) │ └── flags: decimal ├── opening_loc: (1,0)-(1,1) = "[" - ├── closing_loc: (7,1)-(7,2) = "]" - └── flags: ∅ + └── closing_loc: (7,1)-(7,2) = "]" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt index 540dd219fa..e12caf2895 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt @@ -9,6 +9,7 @@ ├── name_loc: (1,0)-(1,1) = "a" ├── value: │ @ CallNode (location: (1,4)-(1,20)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :foo @@ -16,51 +17,50 @@ │ ├── opening_loc: (1,7)-(1,8) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,8)-(1,19)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,8)-(1,19)) - │ │ │ ├── receiver: - │ │ │ │ @ InterpolatedStringNode (location: (1,8)-(1,14)) - │ │ │ │ ├── opening_loc: (1,8)-(1,14) = "<<~EOF" - │ │ │ │ ├── parts: (length: 3) - │ │ │ │ │ ├── @ StringNode (location: (2,0)-(3,0)) - │ │ │ │ │ │ ├── flags: ∅ - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── content_loc: (2,0)-(3,0) = "\n" - │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ └── unescaped: "\n" - │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (3,4)-(3,10)) - │ │ │ │ │ │ ├── opening_loc: (3,4)-(3,6) = "\#{" - │ │ │ │ │ │ ├── statements: - │ │ │ │ │ │ │ @ StatementsNode (location: (3,6)-(3,9)) - │ │ │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,9)) - │ │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ │ │ ├── name: :bar - │ │ │ │ │ │ │ ├── message_loc: (3,6)-(3,9) = "bar" - │ │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ │ │ └── flags: variable_call - │ │ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}" - │ │ │ │ │ └── @ StringNode (location: (3,10)-(4,0)) - │ │ │ │ │ ├── flags: ∅ - │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (3,10)-(4,0) = "baz\n" - │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ └── unescaped: "baz\n" - │ │ │ │ └── closing_loc: (4,0)-(5,0) = " EOF\n" - │ │ │ ├── call_operator_loc: (1,14)-(1,15) = "." - │ │ │ ├── name: :chop - │ │ │ ├── message_loc: (1,15)-(1,19) = "chop" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,8)-(1,19)) + │ │ ├── flags: ∅ + │ │ ├── receiver: + │ │ │ @ InterpolatedStringNode (location: (1,8)-(1,14)) + │ │ │ ├── opening_loc: (1,8)-(1,14) = "<<~EOF" + │ │ │ ├── parts: (length: 3) + │ │ │ │ ├── @ StringNode (location: (2,0)-(3,0)) + │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ │ ├── content_loc: (2,0)-(3,0) = "\n" + │ │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ │ └── unescaped: "\n" + │ │ │ │ ├── @ EmbeddedStatementsNode (location: (3,4)-(3,10)) + │ │ │ │ │ ├── opening_loc: (3,4)-(3,6) = "\#{" + │ │ │ │ │ ├── statements: + │ │ │ │ │ │ @ StatementsNode (location: (3,6)-(3,9)) + │ │ │ │ │ │ └── body: (length: 1) + │ │ │ │ │ │ └── @ CallNode (location: (3,6)-(3,9)) + │ │ │ │ │ │ ├── flags: variable_call + │ │ │ │ │ │ ├── receiver: ∅ + │ │ │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ │ │ ├── name: :bar + │ │ │ │ │ │ ├── message_loc: (3,6)-(3,9) = "bar" + │ │ │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ │ │ ├── arguments: ∅ + │ │ │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ │ │ └── block: ∅ + │ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}" + │ │ │ │ └── @ StringNode (location: (3,10)-(4,0)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── content_loc: (3,10)-(4,0) = "baz\n" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "baz\n" + │ │ │ └── closing_loc: (4,0)-(5,0) = " EOF\n" + │ │ ├── call_operator_loc: (1,14)-(1,15) = "." + │ │ ├── name: :chop + │ │ ├── message_loc: (1,15)-(1,19) = "chop" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ ├── closing_loc: (1,19)-(1,20) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt b/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt index c3622c841f..bc05047b40 100644 --- a/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt +++ b/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(4,6)) + ├── flags: ∅ ├── receiver: │ @ StringNode (location: (1,0)-(1,5)) │ ├── flags: ∅ @@ -17,5 +18,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/if_symbol.txt b/test/prism/snapshots/seattlerb/if_symbol.txt index e561b6c026..ee400c931d 100644 --- a/test/prism/snapshots/seattlerb/if_symbol.txt +++ b/test/prism/snapshots/seattlerb/if_symbol.txt @@ -7,6 +7,7 @@ ├── if_keyword_loc: (1,0)-(1,2) = "if" ├── predicate: │ @ CallNode (location: (1,3)-(1,7)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -14,16 +15,15 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,5)-(1,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ SymbolNode (location: (1,5)-(1,7)) - │ │ │ ├── opening_loc: (1,5)-(1,6) = ":" - │ │ │ ├── value_loc: (1,6)-(1,7) = "x" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "x" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ SymbolNode (location: (1,5)-(1,7)) + │ │ ├── opening_loc: (1,5)-(1,6) = ":" + │ │ ├── value_loc: (1,6)-(1,7) = "x" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "x" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── then_keyword_loc: ∅ ├── statements: ∅ ├── consequent: ∅ diff --git a/test/prism/snapshots/seattlerb/index_0.txt b/test/prism/snapshots/seattlerb/index_0.txt index e295b2aadf..3be81b5435 100644 --- a/test/prism/snapshots/seattlerb/index_0.txt +++ b/test/prism/snapshots/seattlerb/index_0.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,26 +15,24 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :[]= ├── message_loc: (1,1)-(1,3) = "[]" ├── opening_loc: (1,1)-(1,2) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,6)-(1,7)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,6)-(1,7)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :b - │ │ ├── message_loc: (1,6)-(1,7) = "b" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,6)-(1,7)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :b + │ ├── message_loc: (1,6)-(1,7) = "b" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: (1,2)-(1,3) = "]" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/index_0_opasgn.txt b/test/prism/snapshots/seattlerb/index_0_opasgn.txt index 30eba375e0..d43bdceb71 100644 --- a/test/prism/snapshots/seattlerb/index_0_opasgn.txt +++ b/test/prism/snapshots/seattlerb/index_0_opasgn.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ IndexOperatorWriteNode (location: (1,0)-(1,8)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,18 +15,17 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── opening_loc: (1,1)-(1,2) = "[" ├── arguments: ∅ ├── closing_loc: (1,2)-(1,3) = "]" ├── block: ∅ - ├── flags: ∅ ├── operator: :+ ├── operator_loc: (1,4)-(1,6) = "+=" └── value: @ CallNode (location: (1,7)-(1,8)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -32,5 +33,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt b/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt index 3a8819e7a1..c203ec781c 100644 --- a/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt +++ b/test/prism/snapshots/seattlerb/interpolated_symbol_array_line_breaks.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,1)) └── body: (length: 2) ├── @ ArrayNode (location: (1,0)-(4,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ SymbolNode (location: (2,0)-(2,1)) │ │ │ ├── opening_loc: ∅ @@ -16,7 +17,6 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b" │ ├── opening_loc: (1,0)-(1,3) = "%I(" - │ ├── closing_loc: (4,0)-(4,1) = ")" - │ └── flags: ∅ + │ └── closing_loc: (4,0)-(4,1) = ")" └── @ IntegerNode (location: (5,0)-(5,1)) └── flags: decimal diff --git a/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt b/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt index 5d81874350..bc28bf8574 100644 --- a/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt +++ b/test/prism/snapshots/seattlerb/interpolated_word_array_line_breaks.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,1)) └── body: (length: 2) ├── @ ArrayNode (location: (1,0)-(4,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ StringNode (location: (2,0)-(2,1)) │ │ │ ├── flags: ∅ @@ -18,7 +19,6 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b" │ ├── opening_loc: (1,0)-(1,3) = "%W(" - │ ├── closing_loc: (4,0)-(4,1) = ")" - │ └── flags: ∅ + │ └── closing_loc: (4,0)-(4,1) = ")" └── @ IntegerNode (location: (5,0)-(5,1)) └── flags: decimal diff --git a/test/prism/snapshots/seattlerb/iter_args_1.txt b/test/prism/snapshots/seattlerb/iter_args_1.txt index 86d2974746..0a296a66cd 100644 --- a/test/prism/snapshots/seattlerb/iter_args_1.txt +++ b/test/prism/snapshots/seattlerb/iter_args_1.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,29 +12,28 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,11)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,9)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,8)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ └── @ RequiredParameterNode (location: (1,7)-(1,8)) - │ │ │ │ └── name: :b - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,8)-(1,9) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,10)-(1,11) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,11)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,9)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,8)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ └── @ RequiredParameterNode (location: (1,7)-(1,8)) + │ │ │ └── name: :b + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,8)-(1,9) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,10)-(1,11) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_10_1.txt b/test/prism/snapshots/seattlerb/iter_args_10_1.txt index 41db5311e3..8bccaacefd 100644 --- a/test/prism/snapshots/seattlerb/iter_args_10_1.txt +++ b/test/prism/snapshots/seattlerb/iter_args_10_1.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,21)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,21)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,21)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,19)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,18)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c" - │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*" - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,18)-(1,19) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,20)-(1,21) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,21)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,19)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,18)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,12)-(1,14)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,17)-(1,18) = "c" + │ │ │ └── operator_loc: (1,16)-(1,17) = "*" + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,18)-(1,19) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,20)-(1,21) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_10_2.txt b/test/prism/snapshots/seattlerb/iter_args_10_2.txt index 511ea42820..08eacad4aa 100644 --- a/test/prism/snapshots/seattlerb/iter_args_10_2.txt +++ b/test/prism/snapshots/seattlerb/iter_args_10_2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,25)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,25)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,42 +12,41 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,25)) - │ ├── locals: [:a, :b, :c, :d] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,23)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,22)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c" - │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*" - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,20)-(1,22)) - │ │ │ ├── name: :d - │ │ │ ├── name_loc: (1,21)-(1,22) = "d" - │ │ │ └── operator_loc: (1,20)-(1,21) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,22)-(1,23) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,24)-(1,25) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,25)) + ├── locals: [:a, :b, :c, :d] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,23)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,22)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,12)-(1,14)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,17)-(1,18) = "c" + │ │ │ └── operator_loc: (1,16)-(1,17) = "*" + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,20)-(1,22)) + │ │ ├── name: :d + │ │ ├── name_loc: (1,21)-(1,22) = "d" + │ │ └── operator_loc: (1,20)-(1,21) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,22)-(1,23) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,24)-(1,25) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_11_1.txt b/test/prism/snapshots/seattlerb/iter_args_11_1.txt index b9abf90fd7..e4c0a21997 100644 --- a/test/prism/snapshots/seattlerb/iter_args_11_1.txt +++ b/test/prism/snapshots/seattlerb/iter_args_11_1.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,24)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,24)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,24)) - │ ├── locals: [:a, :b, :c, :d] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,22)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,21)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c" - │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21)) - │ │ │ │ └── name: :d - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,21)-(1,22) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,23)-(1,24) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,24)) + ├── locals: [:a, :b, :c, :d] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,22)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,21)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,12)-(1,14)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,17)-(1,18) = "c" + │ │ │ └── operator_loc: (1,16)-(1,17) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21)) + │ │ │ └── name: :d + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,21)-(1,22) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,23)-(1,24) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_11_2.txt b/test/prism/snapshots/seattlerb/iter_args_11_2.txt index 10fae97455..369075ca3c 100644 --- a/test/prism/snapshots/seattlerb/iter_args_11_2.txt +++ b/test/prism/snapshots/seattlerb/iter_args_11_2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,28)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,28)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,44 +12,43 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,28)) - │ ├── locals: [:a, :b, :c, :d, :e] - │ ├── locals_body_index: 5 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,26)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,25)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,12)-(1,14)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,17)-(1,18) = "c" - │ │ │ │ └── operator_loc: (1,16)-(1,17) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21)) - │ │ │ │ └── name: :d - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,23)-(1,25)) - │ │ │ ├── name: :e - │ │ │ ├── name_loc: (1,24)-(1,25) = "e" - │ │ │ └── operator_loc: (1,23)-(1,24) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,25)-(1,26) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,27)-(1,28) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,28)) + ├── locals: [:a, :b, :c, :d, :e] + ├── locals_body_index: 5 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,26)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,25)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,14)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ ├── operator_loc: (1,10)-(1,11) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,12)-(1,14)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,16)-(1,18)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,17)-(1,18) = "c" + │ │ │ └── operator_loc: (1,16)-(1,17) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,20)-(1,21)) + │ │ │ └── name: :d + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,23)-(1,25)) + │ │ ├── name: :e + │ │ ├── name_loc: (1,24)-(1,25) = "e" + │ │ └── operator_loc: (1,23)-(1,24) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,25)-(1,26) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,27)-(1,28) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_2__19.txt b/test/prism/snapshots/seattlerb/iter_args_2__19.txt index 4e2c2d8337..9934cc4349 100644 --- a/test/prism/snapshots/seattlerb/iter_args_2__19.txt +++ b/test/prism/snapshots/seattlerb/iter_args_2__19.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,35 +12,34 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,14)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,12)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,11)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) - │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) - │ │ │ │ │ │ └── name: :a - │ │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :b - │ │ │ │ ├── rest: ∅ - │ │ │ │ ├── rights: (length: 0) - │ │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" - │ │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,11)-(1,12) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,13)-(1,14) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,14)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,12)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,11)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ MultiTargetNode (location: (1,5)-(1,11)) + │ │ │ ├── lefts: (length: 2) + │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) + │ │ │ │ │ └── name: :a + │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :b + │ │ │ ├── rest: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (1,5)-(1,6) = "(" + │ │ │ └── rparen_loc: (1,10)-(1,11) = ")" + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,11)-(1,12) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,13)-(1,14) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_3.txt b/test/prism/snapshots/seattlerb/iter_args_3.txt index 90e04a8650..abd2eec189 100644 --- a/test/prism/snapshots/seattlerb/iter_args_3.txt +++ b/test/prism/snapshots/seattlerb/iter_args_3.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,20)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,20)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,39 +12,38 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,20)) - │ ├── locals: [:a, :b, :c, :d] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,18)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,17)) - │ │ │ ├── requireds: (length: 3) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ │ └── name: :a - │ │ │ │ ├── @ MultiTargetNode (location: (1,8)-(1,14)) - │ │ │ │ │ ├── lefts: (length: 2) - │ │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ │ │ └── name: :b - │ │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) - │ │ │ │ │ │ └── name: :c - │ │ │ │ │ ├── rest: ∅ - │ │ │ │ │ ├── rights: (length: 0) - │ │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" - │ │ │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" - │ │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17)) - │ │ │ │ └── name: :d - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,17)-(1,18) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,19)-(1,20) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,20)) + ├── locals: [:a, :b, :c, :d] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,18)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,17)) + │ │ ├── requireds: (length: 3) + │ │ │ ├── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ │ └── name: :a + │ │ │ ├── @ MultiTargetNode (location: (1,8)-(1,14)) + │ │ │ │ ├── lefts: (length: 2) + │ │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ │ │ └── name: :b + │ │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) + │ │ │ │ │ └── name: :c + │ │ │ │ ├── rest: ∅ + │ │ │ │ ├── rights: (length: 0) + │ │ │ │ ├── lparen_loc: (1,8)-(1,9) = "(" + │ │ │ │ └── rparen_loc: (1,13)-(1,14) = ")" + │ │ │ └── @ RequiredParameterNode (location: (1,16)-(1,17)) + │ │ │ └── name: :d + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,17)-(1,18) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,19)-(1,20) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_4.txt b/test/prism/snapshots/seattlerb/iter_args_4.txt index 4433820c6c..8a64bdb1f8 100644 --- a/test/prism/snapshots/seattlerb/iter_args_4.txt +++ b/test/prism/snapshots/seattlerb/iter_args_4.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,33 +12,32 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,16)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,14)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,13)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,8)-(1,10)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,9)-(1,10) = "b" - │ │ │ │ └── operator_loc: (1,8)-(1,9) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) - │ │ │ │ └── name: :c - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,13)-(1,14) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,15)-(1,16) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,16)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,14)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,13)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 0) + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,8)-(1,10)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,9)-(1,10) = "b" + │ │ │ └── operator_loc: (1,8)-(1,9) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) + │ │ │ └── name: :c + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,13)-(1,14) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,15)-(1,16) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_5.txt b/test/prism/snapshots/seattlerb/iter_args_5.txt index c47531f69e..0aaf2c47b2 100644 --- a/test/prism/snapshots/seattlerb/iter_args_5.txt +++ b/test/prism/snapshots/seattlerb/iter_args_5.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,13)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,11)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,10)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,8)-(1,10)) - │ │ │ ├── name: :b - │ │ │ ├── name_loc: (1,9)-(1,10) = "b" - │ │ │ └── operator_loc: (1,8)-(1,9) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,10)-(1,11) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,12)-(1,13) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,13)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,11)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,10)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,8)-(1,10)) + │ │ ├── name: :b + │ │ ├── name_loc: (1,9)-(1,10) = "b" + │ │ └── operator_loc: (1,8)-(1,9) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,10)-(1,11) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,12)-(1,13) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_6.txt b/test/prism/snapshots/seattlerb/iter_args_6.txt index f5bcbbe027..cc8a4f72eb 100644 --- a/test/prism/snapshots/seattlerb/iter_args_6.txt +++ b/test/prism/snapshots/seattlerb/iter_args_6.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,18)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,18)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,36 +12,35 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,18)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,16)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,15)) - │ │ │ ├── requireds: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) - │ │ │ │ └── name: :a - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,12)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,8)-(1,9) = "b" - │ │ │ │ ├── operator_loc: (1,9)-(1,10) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,10)-(1,12)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) - │ │ │ │ └── name: :c - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,15)-(1,16) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,17)-(1,18) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,18)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,16)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,15)) + │ │ ├── requireds: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,5)-(1,6)) + │ │ │ └── name: :a + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,8)-(1,12)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,8)-(1,9) = "b" + │ │ │ ├── operator_loc: (1,9)-(1,10) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,10)-(1,12)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,14)-(1,15)) + │ │ │ └── name: :c + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,15)-(1,16) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,17)-(1,18) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_7_1.txt b/test/prism/snapshots/seattlerb/iter_args_7_1.txt index ca1a729acb..5deb0d55be 100644 --- a/test/prism/snapshots/seattlerb/iter_args_7_1.txt +++ b/test/prism/snapshots/seattlerb/iter_args_7_1.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,18)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,18)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,36 +12,35 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,18)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,16)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,15)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b" - │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*" - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,15)-(1,16) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,17)-(1,18) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,18)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,16)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,15)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,5)-(1,6) = "a" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,14)-(1,15) = "b" + │ │ │ └── operator_loc: (1,13)-(1,14) = "*" + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,15)-(1,16) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,17)-(1,18) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_7_2.txt b/test/prism/snapshots/seattlerb/iter_args_7_2.txt index f581191e39..fc49660153 100644 --- a/test/prism/snapshots/seattlerb/iter_args_7_2.txt +++ b/test/prism/snapshots/seattlerb/iter_args_7_2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,22)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,22)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,40 +12,39 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,22)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,20)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,19)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b" - │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*" - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,17)-(1,19)) - │ │ │ ├── name: :c - │ │ │ ├── name_loc: (1,18)-(1,19) = "c" - │ │ │ └── operator_loc: (1,17)-(1,18) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,19)-(1,20) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,21)-(1,22) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,22)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,20)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,19)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,5)-(1,6) = "a" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,14)-(1,15) = "b" + │ │ │ └── operator_loc: (1,13)-(1,14) = "*" + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,17)-(1,19)) + │ │ ├── name: :c + │ │ ├── name_loc: (1,18)-(1,19) = "c" + │ │ └── operator_loc: (1,17)-(1,18) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,19)-(1,20) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,21)-(1,22) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_8_1.txt b/test/prism/snapshots/seattlerb/iter_args_8_1.txt index c9ddadf4c6..aec251bffb 100644 --- a/test/prism/snapshots/seattlerb/iter_args_8_1.txt +++ b/test/prism/snapshots/seattlerb/iter_args_8_1.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,21)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,21)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,21)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,19)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,18)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b" - │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18)) - │ │ │ │ └── name: :c - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,18)-(1,19) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,20)-(1,21) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,21)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,19)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,18)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,5)-(1,6) = "a" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,14)-(1,15) = "b" + │ │ │ └── operator_loc: (1,13)-(1,14) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18)) + │ │ │ └── name: :c + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,18)-(1,19) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,20)-(1,21) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_8_2.txt b/test/prism/snapshots/seattlerb/iter_args_8_2.txt index f5e2e19fb6..f1f925dd86 100644 --- a/test/prism/snapshots/seattlerb/iter_args_8_2.txt +++ b/test/prism/snapshots/seattlerb/iter_args_8_2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,25)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,25)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,42 +12,41 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,25)) - │ ├── locals: [:a, :b, :c, :d] - │ ├── locals_body_index: 4 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,23)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,22)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: - │ │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,14)-(1,15) = "b" - │ │ │ │ └── operator_loc: (1,13)-(1,14) = "*" - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18)) - │ │ │ │ └── name: :c - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,20)-(1,22)) - │ │ │ ├── name: :d - │ │ │ ├── name_loc: (1,21)-(1,22) = "d" - │ │ │ └── operator_loc: (1,20)-(1,21) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,22)-(1,23) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,24)-(1,25) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,25)) + ├── locals: [:a, :b, :c, :d] + ├── locals_body_index: 4 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,23)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,22)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,5)-(1,6) = "a" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: + │ │ │ @ RestParameterNode (location: (1,13)-(1,15)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,14)-(1,15) = "b" + │ │ │ └── operator_loc: (1,13)-(1,14) = "*" + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,17)-(1,18)) + │ │ │ └── name: :c + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,20)-(1,22)) + │ │ ├── name: :d + │ │ ├── name_loc: (1,21)-(1,22) = "d" + │ │ └── operator_loc: (1,20)-(1,21) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,22)-(1,23) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,24)-(1,25) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_9_1.txt b/test/prism/snapshots/seattlerb/iter_args_9_1.txt index 5d89d7c6c4..1fc22f1043 100644 --- a/test/prism/snapshots/seattlerb/iter_args_9_1.txt +++ b/test/prism/snapshots/seattlerb/iter_args_9_1.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,34 +12,33 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:a, :b] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ └── name: :b - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:a, :b] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,5)-(1,6) = "a" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ └── name: :b + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_args_9_2.txt b/test/prism/snapshots/seattlerb/iter_args_9_2.txt index 5bb7359e03..6a18271ba2 100644 --- a/test/prism/snapshots/seattlerb/iter_args_9_2.txt +++ b/test/prism/snapshots/seattlerb/iter_args_9_2.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,21)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,21)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,21)) - │ ├── locals: [:a, :b, :c] - │ ├── locals_body_index: 3 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,19)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,18)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) - │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (1,5)-(1,6) = "a" - │ │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,9)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 1) - │ │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) - │ │ │ │ └── name: :b - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: - │ │ │ @ BlockParameterNode (location: (1,16)-(1,18)) - │ │ │ ├── name: :c - │ │ │ ├── name_loc: (1,17)-(1,18) = "c" - │ │ │ └── operator_loc: (1,16)-(1,17) = "&" - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,18)-(1,19) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,20)-(1,21) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,21)) + ├── locals: [:a, :b, :c] + ├── locals_body_index: 3 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,19)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,18)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 1) + │ │ │ └── @ OptionalParameterNode (location: (1,5)-(1,11)) + │ │ │ ├── name: :a + │ │ │ ├── name_loc: (1,5)-(1,6) = "a" + │ │ │ ├── operator_loc: (1,7)-(1,8) = "=" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,9)-(1,11)) + │ │ │ └── flags: decimal + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 1) + │ │ │ └── @ RequiredParameterNode (location: (1,13)-(1,14)) + │ │ │ └── name: :b + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: + │ │ @ BlockParameterNode (location: (1,16)-(1,18)) + │ │ ├── name: :c + │ │ ├── name_loc: (1,17)-(1,18) = "c" + │ │ └── operator_loc: (1,16)-(1,17) = "&" + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,18)-(1,19) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,20)-(1,21) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_kwarg.txt b/test/prism/snapshots/seattlerb/iter_kwarg.txt index 8aa0823bc5..d1f71bfd08 100644 --- a/test/prism/snapshots/seattlerb/iter_kwarg.txt +++ b/test/prism/snapshots/seattlerb/iter_kwarg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,12)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,12)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,31 +12,30 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,12)) - │ ├── locals: [:b] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,10)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,9)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,8)-(1,9)) - │ │ │ │ └── flags: decimal - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,9)-(1,10) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,11)-(1,12) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,12)) + ├── locals: [:b] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,10)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,9)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 1) + │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,5)-(1,7) = "b:" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,8)-(1,9)) + │ │ │ └── flags: decimal + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,9)-(1,10) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,11)-(1,12) = "}" diff --git a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt index bf1a2e8f82..6b85b3858e 100644 --- a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt +++ b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,35 +12,34 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(1,17)) - │ ├── locals: [:b, :c] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,4)-(1,15)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,5)-(1,14)) - │ │ │ ├── requireds: (length: 0) - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9)) - │ │ │ │ ├── name: :b - │ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:" - │ │ │ │ └── value: - │ │ │ │ @ IntegerNode (location: (1,8)-(1,9)) - │ │ │ │ └── flags: decimal - │ │ │ ├── keyword_rest: - │ │ │ │ @ KeywordRestParameterNode (location: (1,11)-(1,14)) - │ │ │ │ ├── name: :c - │ │ │ │ ├── name_loc: (1,13)-(1,14) = "c" - │ │ │ │ └── operator_loc: (1,11)-(1,13) = "**" - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,4)-(1,5) = "|" - │ │ └── closing_loc: (1,14)-(1,15) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,2)-(1,3) = "{" - │ └── closing_loc: (1,16)-(1,17) = "}" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(1,17)) + ├── locals: [:b, :c] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,4)-(1,15)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,5)-(1,14)) + │ │ ├── requireds: (length: 0) + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 1) + │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9)) + │ │ │ ├── name: :b + │ │ │ ├── name_loc: (1,5)-(1,7) = "b:" + │ │ │ └── value: + │ │ │ @ IntegerNode (location: (1,8)-(1,9)) + │ │ │ └── flags: decimal + │ │ ├── keyword_rest: + │ │ │ @ KeywordRestParameterNode (location: (1,11)-(1,14)) + │ │ │ ├── name: :c + │ │ │ ├── name_loc: (1,13)-(1,14) = "c" + │ │ │ └── operator_loc: (1,11)-(1,13) = "**" + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,4)-(1,5) = "|" + │ └── closing_loc: (1,14)-(1,15) = "|" + ├── body: ∅ + ├── opening_loc: (1,2)-(1,3) = "{" + └── closing_loc: (1,16)-(1,17) = "}" diff --git a/test/prism/snapshots/seattlerb/label_vs_string.txt b/test/prism/snapshots/seattlerb/label_vs_string.txt index 55c40273b8..a0832d8a47 100644 --- a/test/prism/snapshots/seattlerb/label_vs_string.txt +++ b/test/prism/snapshots/seattlerb/label_vs_string.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(2,1)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(2,1)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,4)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :_buf @@ -13,22 +15,20 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :<< ├── message_loc: (1,5)-(1,7) = "<<" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,8)-(2,1)) - │ ├── arguments: (length: 1) - │ │ └── @ StringNode (location: (1,8)-(2,1)) - │ │ ├── flags: ∅ - │ │ ├── opening_loc: (1,8)-(1,9) = "'" - │ │ ├── content_loc: (1,9)-(2,0) = ":\n" - │ │ ├── closing_loc: (2,0)-(2,1) = "'" - │ │ └── unescaped: ":\n" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ StringNode (location: (1,8)-(2,1)) + │ ├── flags: ∅ + │ ├── opening_loc: (1,8)-(1,9) = "'" + │ ├── content_loc: (1,9)-(2,0) = ":\n" + │ ├── closing_loc: (2,0)-(2,1) = "'" + │ └── unescaped: ":\n" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt index b9018e8f50..e451aca510 100644 --- a/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt +++ b/test/prism/snapshots/seattlerb/lambda_do_vs_brace.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(7,9)) └── body: (length: 4) ├── @ CallNode (location: (1,0)-(1,11)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -11,20 +12,20 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,11)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ LambdaNode (location: (1,2)-(1,11)) - │ │ │ ├── locals: [] - │ │ │ ├── locals_body_index: 0 - │ │ │ ├── operator_loc: (1,2)-(1,4) = "->" - │ │ │ ├── opening_loc: (1,5)-(1,7) = "do" - │ │ │ ├── closing_loc: (1,8)-(1,11) = "end" - │ │ │ ├── parameters: ∅ - │ │ │ └── body: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LambdaNode (location: (1,2)-(1,11)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── operator_loc: (1,2)-(1,4) = "->" + │ │ ├── opening_loc: (1,5)-(1,7) = "do" + │ │ ├── closing_loc: (1,8)-(1,11) = "end" + │ │ ├── parameters: ∅ + │ │ └── body: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── @ CallNode (location: (3,0)-(3,7)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -32,20 +33,20 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (3,2)-(3,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ LambdaNode (location: (3,2)-(3,7)) - │ │ │ ├── locals: [] - │ │ │ ├── locals_body_index: 0 - │ │ │ ├── operator_loc: (3,2)-(3,4) = "->" - │ │ │ ├── opening_loc: (3,5)-(3,6) = "{" - │ │ │ ├── closing_loc: (3,6)-(3,7) = "}" - │ │ │ ├── parameters: ∅ - │ │ │ └── body: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LambdaNode (location: (3,2)-(3,7)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── operator_loc: (3,2)-(3,4) = "->" + │ │ ├── opening_loc: (3,5)-(3,6) = "{" + │ │ ├── closing_loc: (3,6)-(3,7) = "}" + │ │ ├── parameters: ∅ + │ │ └── body: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── @ CallNode (location: (5,0)-(5,13)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -53,25 +54,25 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (5,2)-(5,13)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ LambdaNode (location: (5,2)-(5,13)) - │ │ │ ├── locals: [] - │ │ │ ├── locals_body_index: 0 - │ │ │ ├── operator_loc: (5,2)-(5,4) = "->" - │ │ │ ├── opening_loc: (5,7)-(5,9) = "do" - │ │ │ ├── closing_loc: (5,10)-(5,13) = "end" - │ │ │ ├── parameters: - │ │ │ │ @ BlockParametersNode (location: (5,4)-(5,6)) - │ │ │ │ ├── parameters: ∅ - │ │ │ │ ├── locals: (length: 0) - │ │ │ │ ├── opening_loc: (5,4)-(5,5) = "(" - │ │ │ │ └── closing_loc: (5,5)-(5,6) = ")" - │ │ │ └── body: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LambdaNode (location: (5,2)-(5,13)) + │ │ ├── locals: [] + │ │ ├── locals_body_index: 0 + │ │ ├── operator_loc: (5,2)-(5,4) = "->" + │ │ ├── opening_loc: (5,7)-(5,9) = "do" + │ │ ├── closing_loc: (5,10)-(5,13) = "end" + │ │ ├── parameters: + │ │ │ @ BlockParametersNode (location: (5,4)-(5,6)) + │ │ │ ├── parameters: ∅ + │ │ │ ├── locals: (length: 0) + │ │ │ ├── opening_loc: (5,4)-(5,5) = "(" + │ │ │ └── closing_loc: (5,5)-(5,6) = ")" + │ │ └── body: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (7,0)-(7,9)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -79,21 +80,20 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (7,2)-(7,9)) - │ ├── arguments: (length: 1) - │ │ └── @ LambdaNode (location: (7,2)-(7,9)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── operator_loc: (7,2)-(7,4) = "->" - │ │ ├── opening_loc: (7,7)-(7,8) = "{" - │ │ ├── closing_loc: (7,8)-(7,9) = "}" - │ │ ├── parameters: - │ │ │ @ BlockParametersNode (location: (7,4)-(7,6)) - │ │ │ ├── parameters: ∅ - │ │ │ ├── locals: (length: 0) - │ │ │ ├── opening_loc: (7,4)-(7,5) = "(" - │ │ │ └── closing_loc: (7,5)-(7,6) = ")" - │ │ └── body: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LambdaNode (location: (7,2)-(7,9)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── operator_loc: (7,2)-(7,4) = "->" + │ ├── opening_loc: (7,7)-(7,8) = "{" + │ ├── closing_loc: (7,8)-(7,9) = "}" + │ ├── parameters: + │ │ @ BlockParametersNode (location: (7,4)-(7,6)) + │ │ ├── parameters: ∅ + │ │ ├── locals: (length: 0) + │ │ ├── opening_loc: (7,4)-(7,5) = "(" + │ │ └── closing_loc: (7,5)-(7,6) = ")" + │ └── body: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt index 82bc590100..fe18d5ad49 100644 --- a/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt +++ b/test/prism/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt @@ -11,6 +11,7 @@ │ @ RescueModifierNode (location: (1,4)-(1,17)) │ ├── expression: │ │ @ CallNode (location: (1,4)-(1,8)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -18,13 +19,12 @@ │ │ ├── opening_loc: (1,5)-(1,6) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (1,6)-(1,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: (1,7)-(1,8) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── keyword_loc: (1,9)-(1,15) = "rescue" │ └── rescue_expression: │ @ IntegerNode (location: (1,16)-(1,17)) diff --git a/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt b/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt index ce6b05e8d1..637451a550 100644 --- a/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt +++ b/test/prism/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt @@ -11,6 +11,7 @@ │ @ RescueModifierNode (location: (1,4)-(1,16)) │ ├── expression: │ │ @ CallNode (location: (1,4)-(1,7)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -18,13 +19,12 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (1,6)-(1,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (1,6)-(1,7)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── keyword_loc: (1,8)-(1,14) = "rescue" │ └── rescue_expression: │ @ IntegerNode (location: (1,15)-(1,16)) diff --git a/test/prism/snapshots/seattlerb/lasgn_command.txt b/test/prism/snapshots/seattlerb/lasgn_command.txt index 2f2709577b..4b38e56028 100644 --- a/test/prism/snapshots/seattlerb/lasgn_command.txt +++ b/test/prism/snapshots/seattlerb/lasgn_command.txt @@ -9,8 +9,10 @@ ├── name_loc: (1,0)-(1,1) = "a" ├── value: │ @ CallNode (location: (1,4)-(1,9)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,4)-(1,5)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -18,19 +20,17 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,5)-(1,6) = "." │ ├── name: :c │ ├── message_loc: (1,6)-(1,7) = "c" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,8)-(1,9)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,8)-(1,9)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,8)-(1,9)) + │ │ └── flags: decimal │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt b/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt index 6c5bfb8d9e..8d6662ae0d 100644 --- a/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt +++ b/test/prism/snapshots/seattlerb/lasgn_lasgn_command_call.txt @@ -14,6 +14,7 @@ │ ├── name_loc: (1,4)-(1,5) = "b" │ ├── value: │ │ @ CallNode (location: (1,8)-(1,11)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :c @@ -21,12 +22,11 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ IntegerNode (location: (1,10)-(1,11)) + │ │ │ └── flags: decimal │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ └── operator_loc: (1,6)-(1,7) = "=" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt b/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt index f88e98dd50..076c4ec89d 100644 --- a/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt +++ b/test/prism/snapshots/seattlerb/lasgn_middle_splat.txt @@ -9,8 +9,10 @@ ├── name_loc: (1,0)-(1,1) = "a" ├── value: │ @ ArrayNode (location: (1,4)-(1,12)) + │ ├── flags: contains_splat │ ├── elements: (length: 3) │ │ ├── @ CallNode (location: (1,4)-(1,5)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :b @@ -18,12 +20,12 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── @ SplatNode (location: (1,7)-(1,9)) │ │ │ ├── operator_loc: (1,7)-(1,8) = "*" │ │ │ └── expression: │ │ │ @ CallNode (location: (1,8)-(1,9)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :c @@ -31,9 +33,9 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── @ CallNode (location: (1,11)-(1,12)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :d @@ -41,9 +43,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── opening_loc: ∅ - │ ├── closing_loc: ∅ - │ └── flags: contains_splat + │ └── closing_loc: ∅ └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt index f0e7b58109..f1f07d2908 100644 --- a/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt +++ b/test/prism/snapshots/seattlerb/masgn_anon_splat_arg.txt @@ -18,6 +18,7 @@ ├── operator_loc: (1,5)-(1,6) = "=" └── value: @ CallNode (location: (1,7)-(1,8)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -25,5 +26,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt b/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt index 8bf3c37350..e7e304f7c8 100644 --- a/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt +++ b/test/prism/snapshots/seattlerb/masgn_arg_colon_arg.txt @@ -9,8 +9,10 @@ │ │ ├── name: :a │ │ └── depth: 0 │ └── @ CallNode (location: (1,3)-(1,7)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,3)-(1,4)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -18,16 +20,14 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,4)-(1,6) = "::" │ ├── name: :c= │ ├── message_loc: (1,6)-(1,7) = "c" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── rest: ∅ ├── rights: (length: 0) ├── lparen_loc: ∅ @@ -35,6 +35,7 @@ ├── operator_loc: (1,8)-(1,9) = "=" └── value: @ CallNode (location: (1,10)-(1,11)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :d @@ -42,5 +43,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_arg_ident.txt b/test/prism/snapshots/seattlerb/masgn_arg_ident.txt index ff55c6b8f7..e8c9958e74 100644 --- a/test/prism/snapshots/seattlerb/masgn_arg_ident.txt +++ b/test/prism/snapshots/seattlerb/masgn_arg_ident.txt @@ -9,8 +9,10 @@ │ │ ├── name: :a │ │ └── depth: 0 │ └── @ CallNode (location: (1,3)-(1,6)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,3)-(1,4)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -18,16 +20,14 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,4)-(1,5) = "." │ ├── name: :C= │ ├── message_loc: (1,5)-(1,6) = "C" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── rest: ∅ ├── rights: (length: 0) ├── lparen_loc: ∅ @@ -35,6 +35,7 @@ ├── operator_loc: (1,7)-(1,8) = "=" └── value: @ CallNode (location: (1,9)-(1,10)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :d @@ -42,5 +43,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt index 9492bd340f..3d756144c5 100644 --- a/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt +++ b/test/prism/snapshots/seattlerb/masgn_arg_splat_arg.txt @@ -24,6 +24,7 @@ ├── operator_loc: (1,9)-(1,10) = "=" └── value: @ CallNode (location: (1,11)-(1,12)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :d @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_colon2.txt b/test/prism/snapshots/seattlerb/masgn_colon2.txt index e97891ebd3..5a5b5e67db 100644 --- a/test/prism/snapshots/seattlerb/masgn_colon2.txt +++ b/test/prism/snapshots/seattlerb/masgn_colon2.txt @@ -11,6 +11,7 @@ │ └── @ ConstantPathTargetNode (location: (1,3)-(1,7)) │ ├── parent: │ │ @ CallNode (location: (1,3)-(1,4)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -18,8 +19,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── child: │ │ @ ConstantReadNode (location: (1,6)-(1,7)) │ │ └── name: :C @@ -31,11 +31,11 @@ ├── operator_loc: (1,8)-(1,9) = "=" └── value: @ ArrayNode (location: (1,10)-(1,14)) + ├── flags: ∅ ├── elements: (length: 2) │ ├── @ IntegerNode (location: (1,10)-(1,11)) │ │ └── flags: decimal │ └── @ IntegerNode (location: (1,13)-(1,14)) │ └── flags: decimal ├── opening_loc: ∅ - ├── closing_loc: ∅ - └── flags: ∅ + └── closing_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_colon3.txt b/test/prism/snapshots/seattlerb/masgn_colon3.txt index 836ce91c7f..f2880a4426 100644 --- a/test/prism/snapshots/seattlerb/masgn_colon3.txt +++ b/test/prism/snapshots/seattlerb/masgn_colon3.txt @@ -24,11 +24,11 @@ ├── operator_loc: (1,9)-(1,10) = "=" └── value: @ ArrayNode (location: (1,11)-(1,15)) + ├── flags: ∅ ├── elements: (length: 2) │ ├── @ IntegerNode (location: (1,11)-(1,12)) │ │ └── flags: decimal │ └── @ IntegerNode (location: (1,14)-(1,15)) │ └── flags: decimal ├── opening_loc: ∅ - ├── closing_loc: ∅ - └── flags: ∅ + └── closing_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_command_call.txt b/test/prism/snapshots/seattlerb/masgn_command_call.txt index 7a7b26b9c3..974910101b 100644 --- a/test/prism/snapshots/seattlerb/masgn_command_call.txt +++ b/test/prism/snapshots/seattlerb/masgn_command_call.txt @@ -16,8 +16,10 @@ ├── operator_loc: (1,3)-(1,4) = "=" └── value: @ CallNode (location: (1,5)-(1,10)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,5)-(1,6)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :b @@ -25,18 +27,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,6)-(1,7) = "." ├── name: :c ├── message_loc: (1,7)-(1,8) = "c" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,9)-(1,10)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,9)-(1,10)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,9)-(1,10)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_double_paren.txt b/test/prism/snapshots/seattlerb/masgn_double_paren.txt index b6a3748d3f..900e8e0f14 100644 --- a/test/prism/snapshots/seattlerb/masgn_double_paren.txt +++ b/test/prism/snapshots/seattlerb/masgn_double_paren.txt @@ -24,6 +24,7 @@ ├── operator_loc: (1,7)-(1,8) = "=" └── value: @ CallNode (location: (1,8)-(1,9)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt b/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt index 10d0dc3a4a..7615d7d02b 100644 --- a/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt +++ b/test/prism/snapshots/seattlerb/masgn_lhs_splat.txt @@ -18,6 +18,7 @@ ├── operator_loc: (1,3)-(1,4) = "=" └── value: @ ArrayNode (location: (1,5)-(1,12)) + ├── flags: ∅ ├── elements: (length: 3) │ ├── @ IntegerNode (location: (1,5)-(1,6)) │ │ └── flags: decimal @@ -26,5 +27,4 @@ │ └── @ IntegerNode (location: (1,11)-(1,12)) │ └── flags: decimal ├── opening_loc: ∅ - ├── closing_loc: ∅ - └── flags: ∅ + └── closing_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_paren.txt b/test/prism/snapshots/seattlerb/masgn_paren.txt index 49c1a488b2..610f6ba2e4 100644 --- a/test/prism/snapshots/seattlerb/masgn_paren.txt +++ b/test/prism/snapshots/seattlerb/masgn_paren.txt @@ -18,8 +18,10 @@ ├── operator_loc: (1,7)-(1,8) = "=" └── value: @ CallNode (location: (1,9)-(1,12)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,9)-(1,10)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :c @@ -27,13 +29,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,10)-(1,11) = "." ├── name: :d ├── message_loc: (1,11)-(1,12) = "d" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_splat_arg.txt b/test/prism/snapshots/seattlerb/masgn_splat_arg.txt index 75dfd499fe..0d2d782bf1 100644 --- a/test/prism/snapshots/seattlerb/masgn_splat_arg.txt +++ b/test/prism/snapshots/seattlerb/masgn_splat_arg.txt @@ -21,6 +21,7 @@ ├── operator_loc: (1,6)-(1,7) = "=" └── value: @ CallNode (location: (1,8)-(1,9)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -28,5 +29,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt b/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt index 16fd28db42..be9e1324f8 100644 --- a/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt +++ b/test/prism/snapshots/seattlerb/masgn_splat_arg_arg.txt @@ -24,6 +24,7 @@ ├── operator_loc: (1,9)-(1,10) = "=" └── value: @ CallNode (location: (1,11)-(1,12)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :d @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/masgn_var_star_var.txt b/test/prism/snapshots/seattlerb/masgn_var_star_var.txt index 00ef2e5cf4..0833b44d6b 100644 --- a/test/prism/snapshots/seattlerb/masgn_var_star_var.txt +++ b/test/prism/snapshots/seattlerb/masgn_var_star_var.txt @@ -21,6 +21,7 @@ ├── operator_loc: (1,8)-(1,9) = "=" └── value: @ CallNode (location: (1,10)-(1,11)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -28,5 +29,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt b/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt index 92b636949f..d15cf6fcbc 100644 --- a/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt +++ b/test/prism/snapshots/seattlerb/messy_op_asgn_lineno.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,15)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,15)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,50 +12,49 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,15)) - │ ├── arguments: (length: 1) - │ │ └── @ ParenthesesNode (location: (1,2)-(1,15)) - │ │ ├── body: - │ │ │ @ StatementsNode (location: (1,3)-(1,14)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ ConstantPathOperatorWriteNode (location: (1,3)-(1,14)) - │ │ │ ├── target: - │ │ │ │ @ ConstantPathNode (location: (1,3)-(1,7)) - │ │ │ │ ├── parent: - │ │ │ │ │ @ ConstantReadNode (location: (1,3)-(1,4)) - │ │ │ │ │ └── name: :B - │ │ │ │ ├── child: - │ │ │ │ │ @ ConstantReadNode (location: (1,6)-(1,7)) - │ │ │ │ │ └── name: :C - │ │ │ │ └── delimiter_loc: (1,4)-(1,6) = "::" - │ │ │ ├── operator_loc: (1,8)-(1,10) = "*=" - │ │ │ ├── value: - │ │ │ │ @ CallNode (location: (1,11)-(1,14)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :d - │ │ │ │ ├── message_loc: (1,11)-(1,12) = "d" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: - │ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14)) - │ │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14)) - │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ │ ├── name: :e - │ │ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "e" - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ │ └── flags: variable_call - │ │ │ │ │ └── flags: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: ∅ - │ │ │ └── operator: :* - │ │ ├── opening_loc: (1,2)-(1,3) = "(" - │ │ └── closing_loc: (1,14)-(1,15) = ")" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ParenthesesNode (location: (1,2)-(1,15)) + │ ├── body: + │ │ @ StatementsNode (location: (1,3)-(1,14)) + │ │ └── body: (length: 1) + │ │ └── @ ConstantPathOperatorWriteNode (location: (1,3)-(1,14)) + │ │ ├── target: + │ │ │ @ ConstantPathNode (location: (1,3)-(1,7)) + │ │ │ ├── parent: + │ │ │ │ @ ConstantReadNode (location: (1,3)-(1,4)) + │ │ │ │ └── name: :B + │ │ │ ├── child: + │ │ │ │ @ ConstantReadNode (location: (1,6)-(1,7)) + │ │ │ │ └── name: :C + │ │ │ └── delimiter_loc: (1,4)-(1,6) = "::" + │ │ ├── operator_loc: (1,8)-(1,10) = "*=" + │ │ ├── value: + │ │ │ @ CallNode (location: (1,11)-(1,14)) + │ │ │ ├── flags: ∅ + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :d + │ │ │ ├── message_loc: (1,11)-(1,12) = "d" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: + │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ CallNode (location: (1,13)-(1,14)) + │ │ │ │ ├── flags: variable_call + │ │ │ │ ├── receiver: ∅ + │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ ├── name: :e + │ │ │ │ ├── message_loc: (1,13)-(1,14) = "e" + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── arguments: ∅ + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── block: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ └── operator: :* + │ ├── opening_loc: (1,2)-(1,3) = "(" + │ └── closing_loc: (1,14)-(1,15) = ")" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt b/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt index b2e8c11887..1fa0510b2d 100644 --- a/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt +++ b/test/prism/snapshots/seattlerb/method_call_assoc_trailing_comma.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,10)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,10)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,26 +15,24 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :f ├── message_loc: (1,2)-(1,3) = "f" ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,4)-(1,8)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,4)-(1,8)) - │ │ ├── key: - │ │ │ @ IntegerNode (location: (1,4)-(1,5)) - │ │ │ └── flags: decimal - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,7)-(1,8)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,5)-(1,7) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,4)-(1,8)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,4)-(1,8)) + │ ├── key: + │ │ @ IntegerNode (location: (1,4)-(1,5)) + │ │ └── flags: decimal + │ ├── value: + │ │ @ IntegerNode (location: (1,7)-(1,8)) + │ │ └── flags: decimal + │ └── operator_loc: (1,5)-(1,7) = "=>" ├── closing_loc: (1,9)-(1,10) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt b/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt index 4c9a412404..aea6bc7de1 100644 --- a/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt +++ b/test/prism/snapshots/seattlerb/method_call_trailing_comma.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,18 +15,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :f ├── message_loc: (1,2)-(1,3) = "f" ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,4)-(1,5)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,4)-(1,5)) + │ └── flags: decimal ├── closing_loc: (1,6)-(1,7) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt index debb1e52d2..0bf5baefd5 100644 --- a/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt +++ b/test/prism/snapshots/seattlerb/mlhs_back_anonsplat.txt @@ -24,6 +24,7 @@ ├── operator_loc: (1,11)-(1,12) = "=" └── value: @ CallNode (location: (1,13)-(1,14)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_back_splat.txt b/test/prism/snapshots/seattlerb/mlhs_back_splat.txt index bd80071854..2051bb832b 100644 --- a/test/prism/snapshots/seattlerb/mlhs_back_splat.txt +++ b/test/prism/snapshots/seattlerb/mlhs_back_splat.txt @@ -27,6 +27,7 @@ ├── operator_loc: (1,12)-(1,13) = "=" └── value: @ CallNode (location: (1,14)-(1,15)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -34,5 +35,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt index dd984f725f..fbe7480d50 100644 --- a/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt +++ b/test/prism/snapshots/seattlerb/mlhs_front_anonsplat.txt @@ -24,6 +24,7 @@ ├── operator_loc: (1,11)-(1,12) = "=" └── value: @ CallNode (location: (1,13)-(1,14)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_front_splat.txt b/test/prism/snapshots/seattlerb/mlhs_front_splat.txt index 49a7b1629a..6585289d54 100644 --- a/test/prism/snapshots/seattlerb/mlhs_front_splat.txt +++ b/test/prism/snapshots/seattlerb/mlhs_front_splat.txt @@ -27,6 +27,7 @@ ├── operator_loc: (1,12)-(1,13) = "=" └── value: @ CallNode (location: (1,14)-(1,15)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -34,5 +35,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_keyword.txt b/test/prism/snapshots/seattlerb/mlhs_keyword.txt index 7612ebe2f0..d7033a5203 100644 --- a/test/prism/snapshots/seattlerb/mlhs_keyword.txt +++ b/test/prism/snapshots/seattlerb/mlhs_keyword.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,18 +15,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :!= ├── message_loc: (1,2)-(1,4) = "!=" ├── opening_loc: (1,4)-(1,5) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,15)) - │ ├── arguments: (length: 2) - │ │ ├── @ TrueNode (location: (1,5)-(1,9)) - │ │ └── @ TrueNode (location: (1,11)-(1,15)) - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ TrueNode (location: (1,5)-(1,9)) + │ └── @ TrueNode (location: (1,11)-(1,15)) ├── closing_loc: (1,15)-(1,16) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt b/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt index f0fc933ff5..a2aad9a335 100644 --- a/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt +++ b/test/prism/snapshots/seattlerb/mlhs_mid_anonsplat.txt @@ -33,6 +33,7 @@ ├── operator_loc: (1,20)-(1,21) = "=" └── value: @ CallNode (location: (1,22)-(1,23)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -40,5 +41,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt b/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt index f0d2126ad7..10a0a23917 100644 --- a/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt +++ b/test/prism/snapshots/seattlerb/mlhs_mid_splat.txt @@ -36,6 +36,7 @@ ├── operator_loc: (1,21)-(1,22) = "=" └── value: @ CallNode (location: (1,23)-(1,24)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -43,5 +44,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/mlhs_rescue.txt b/test/prism/snapshots/seattlerb/mlhs_rescue.txt index f438bf6041..9885ab4c78 100644 --- a/test/prism/snapshots/seattlerb/mlhs_rescue.txt +++ b/test/prism/snapshots/seattlerb/mlhs_rescue.txt @@ -20,6 +20,7 @@ @ RescueModifierNode (location: (1,7)-(1,18)) ├── expression: │ @ CallNode (location: (1,7)-(1,8)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -27,8 +28,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── keyword_loc: (1,9)-(1,15) = "rescue" └── rescue_expression: @ IntegerNode (location: (1,16)-(1,18)) diff --git a/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt index b2041a0a3e..208ecdcbc5 100644 --- a/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt +++ b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(8,12)) └── body: (length: 3) ├── @ CallNode (location: (1,0)-(3,2)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -11,27 +12,27 @@ │ ├── opening_loc: (1,1)-(1,2) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(3,1)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ KeywordHashNode (location: (1,2)-(3,1)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocNode (location: (1,2)-(3,1)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (1,2)-(1,8)) - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── value_loc: (1,2)-(1,7) = "state" - │ │ │ │ ├── closing_loc: (1,7)-(1,8) = ":" - │ │ │ │ └── unescaped: "state" - │ │ │ ├── value: - │ │ │ │ @ HashNode (location: (2,1)-(3,1)) - │ │ │ │ ├── opening_loc: (2,1)-(2,2) = "{" - │ │ │ │ ├── elements: (length: 0) - │ │ │ │ └── closing_loc: (3,0)-(3,1) = "}" - │ │ │ └── operator_loc: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (1,2)-(3,1)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (1,2)-(3,1)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (1,2)-(1,8)) + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── value_loc: (1,2)-(1,7) = "state" + │ │ │ ├── closing_loc: (1,7)-(1,8) = ":" + │ │ │ └── unescaped: "state" + │ │ ├── value: + │ │ │ @ HashNode (location: (2,1)-(3,1)) + │ │ │ ├── opening_loc: (2,1)-(2,2) = "{" + │ │ │ ├── elements: (length: 0) + │ │ │ └── closing_loc: (3,0)-(3,1) = "}" + │ │ └── operator_loc: ∅ │ ├── closing_loc: (3,1)-(3,2) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── @ CallNode (location: (5,0)-(6,2)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -39,27 +40,27 @@ │ ├── opening_loc: (5,1)-(5,2) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (5,2)-(6,1)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ KeywordHashNode (location: (5,2)-(6,1)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocNode (location: (5,2)-(6,1)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (5,2)-(5,8)) - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── value_loc: (5,2)-(5,7) = "state" - │ │ │ │ ├── closing_loc: (5,7)-(5,8) = ":" - │ │ │ │ └── unescaped: "state" - │ │ │ ├── value: - │ │ │ │ @ HashNode (location: (5,9)-(6,1)) - │ │ │ │ ├── opening_loc: (5,9)-(5,10) = "{" - │ │ │ │ ├── elements: (length: 0) - │ │ │ │ └── closing_loc: (6,0)-(6,1) = "}" - │ │ │ └── operator_loc: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (5,2)-(6,1)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (5,2)-(6,1)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (5,2)-(5,8)) + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── value_loc: (5,2)-(5,7) = "state" + │ │ │ ├── closing_loc: (5,7)-(5,8) = ":" + │ │ │ └── unescaped: "state" + │ │ ├── value: + │ │ │ @ HashNode (location: (5,9)-(6,1)) + │ │ │ ├── opening_loc: (5,9)-(5,10) = "{" + │ │ │ ├── elements: (length: 0) + │ │ │ └── closing_loc: (6,0)-(6,1) = "}" + │ │ └── operator_loc: ∅ │ ├── closing_loc: (6,1)-(6,2) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (8,0)-(8,12)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -67,23 +68,22 @@ ├── opening_loc: (8,1)-(8,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (8,2)-(8,11)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (8,2)-(8,11)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (8,2)-(8,11)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (8,2)-(8,8)) - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (8,2)-(8,7) = "state" - │ │ │ ├── closing_loc: (8,7)-(8,8) = ":" - │ │ │ └── unescaped: "state" - │ │ ├── value: - │ │ │ @ HashNode (location: (8,9)-(8,11)) - │ │ │ ├── opening_loc: (8,9)-(8,10) = "{" - │ │ │ ├── elements: (length: 0) - │ │ │ └── closing_loc: (8,10)-(8,11) = "}" - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (8,2)-(8,11)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (8,2)-(8,11)) + │ ├── key: + │ │ @ SymbolNode (location: (8,2)-(8,8)) + │ │ ├── opening_loc: ∅ + │ │ ├── value_loc: (8,2)-(8,7) = "state" + │ │ ├── closing_loc: (8,7)-(8,8) = ":" + │ │ └── unescaped: "state" + │ ├── value: + │ │ @ HashNode (location: (8,9)-(8,11)) + │ │ ├── opening_loc: (8,9)-(8,10) = "{" + │ │ ├── elements: (length: 0) + │ │ └── closing_loc: (8,10)-(8,11) = "}" + │ └── operator_loc: ∅ ├── closing_loc: (8,11)-(8,12) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt b/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt index 34ea8f2480..4bea3d1a26 100644 --- a/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt +++ b/test/prism/snapshots/seattlerb/non_interpolated_symbol_array_line_breaks.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,1)) └── body: (length: 2) ├── @ ArrayNode (location: (1,0)-(4,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ SymbolNode (location: (2,0)-(2,1)) │ │ │ ├── opening_loc: ∅ @@ -16,7 +17,6 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b" │ ├── opening_loc: (1,0)-(1,3) = "%i(" - │ ├── closing_loc: (4,0)-(4,1) = ")" - │ └── flags: ∅ + │ └── closing_loc: (4,0)-(4,1) = ")" └── @ IntegerNode (location: (5,0)-(5,1)) └── flags: decimal diff --git a/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt b/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt index 821f18995b..705ab476d6 100644 --- a/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt +++ b/test/prism/snapshots/seattlerb/non_interpolated_word_array_line_breaks.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,1)) └── body: (length: 2) ├── @ ArrayNode (location: (1,0)-(4,1)) + │ ├── flags: ∅ │ ├── elements: (length: 2) │ │ ├── @ StringNode (location: (2,0)-(2,1)) │ │ │ ├── flags: ∅ @@ -18,7 +19,6 @@ │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b" │ ├── opening_loc: (1,0)-(1,3) = "%w(" - │ ├── closing_loc: (4,0)-(4,1) = ")" - │ └── flags: ∅ + │ └── closing_loc: (4,0)-(4,1) = ")" └── @ IntegerNode (location: (5,0)-(5,1)) └── flags: decimal diff --git a/test/prism/snapshots/seattlerb/op_asgn_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_command_call.txt index 22251546e9..ae82ec31cd 100644 --- a/test/prism/snapshots/seattlerb/op_asgn_command_call.txt +++ b/test/prism/snapshots/seattlerb/op_asgn_command_call.txt @@ -8,8 +8,10 @@ ├── operator_loc: (1,2)-(1,5) = "||=" ├── value: │ @ CallNode (location: (1,6)-(1,11)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,6)-(1,7)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -17,20 +19,18 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,7)-(1,8) = "." │ ├── name: :c │ ├── message_loc: (1,8)-(1,9) = "c" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,10)-(1,11)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,10)-(1,11)) + │ │ └── flags: decimal │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── name: :a └── depth: 0 diff --git a/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt index 6da5424b8e..f25e6328be 100644 --- a/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt +++ b/test/prism/snapshots/seattlerb/op_asgn_dot_ident_command_call.txt @@ -4,17 +4,18 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallOrWriteNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── receiver: │ @ ConstantReadNode (location: (1,0)-(1,1)) │ └── name: :A ├── call_operator_loc: (1,1)-(1,2) = "." ├── message_loc: (1,2)-(1,3) = "B" - ├── flags: ∅ ├── read_name: :B ├── write_name: :B= ├── operator_loc: (1,4)-(1,7) = "||=" └── value: @ CallNode (location: (1,8)-(1,11)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -22,10 +23,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,10)-(1,11)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,10)-(1,11)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt index b3f1e1fc35..8737263e2b 100644 --- a/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt +++ b/test/prism/snapshots/seattlerb/op_asgn_index_command_call.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,16)) └── body: (length: 1) └── @ IndexOrWriteNode (location: (1,0)-(1,16)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,25 +15,24 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── opening_loc: (1,1)-(1,2) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,4)) - │ ├── arguments: (length: 1) - │ │ └── @ SymbolNode (location: (1,2)-(1,4)) - │ │ ├── opening_loc: (1,2)-(1,3) = ":" - │ │ ├── value_loc: (1,3)-(1,4) = "b" - │ │ ├── closing_loc: ∅ - │ │ └── unescaped: "b" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ SymbolNode (location: (1,2)-(1,4)) + │ ├── opening_loc: (1,2)-(1,3) = ":" + │ ├── value_loc: (1,3)-(1,4) = "b" + │ ├── closing_loc: ∅ + │ └── unescaped: "b" ├── closing_loc: (1,4)-(1,5) = "]" ├── block: ∅ - ├── flags: ∅ ├── operator_loc: (1,6)-(1,9) = "||=" └── value: @ CallNode (location: (1,10)-(1,16)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -39,12 +40,11 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,12)-(1,16)) - │ ├── arguments: (length: 2) - │ │ ├── @ IntegerNode (location: (1,12)-(1,13)) - │ │ │ └── flags: decimal - │ │ └── @ IntegerNode (location: (1,15)-(1,16)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ IntegerNode (location: (1,12)-(1,13)) + │ │ └── flags: decimal + │ └── @ IntegerNode (location: (1,15)-(1,16)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt index ff10caee56..f17ca505da 100644 --- a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt +++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_const_command_call.txt @@ -16,6 +16,7 @@ ├── operator_loc: (1,5)-(1,7) = "*=" ├── value: │ @ CallNode (location: (1,8)-(1,11)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :c @@ -23,19 +24,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (1,10)-(1,11)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :d - │ │ │ ├── message_loc: (1,10)-(1,11) = "d" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (1,10)-(1,11)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :d + │ │ ├── message_loc: (1,10)-(1,11) = "d" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── operator: :* diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt index 2320e2be0f..0416e0fa71 100644 --- a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt +++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier1.txt @@ -4,12 +4,12 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) └── @ CallOperatorWriteNode (location: (1,0)-(1,9)) + ├── flags: ∅ ├── receiver: │ @ ConstantReadNode (location: (1,0)-(1,1)) │ └── name: :A ├── call_operator_loc: (1,1)-(1,3) = "::" ├── message_loc: (1,3)-(1,4) = "b" - ├── flags: ∅ ├── read_name: :b ├── write_name: :b= ├── operator: :+ diff --git a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt index 3b9bee333f..0fbbe197c7 100644 --- a/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt +++ b/test/prism/snapshots/seattlerb/op_asgn_primary_colon_identifier_command_call.txt @@ -4,18 +4,19 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallOperatorWriteNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── receiver: │ @ ConstantReadNode (location: (1,0)-(1,1)) │ └── name: :A ├── call_operator_loc: (1,1)-(1,3) = "::" ├── message_loc: (1,3)-(1,4) = "b" - ├── flags: ∅ ├── read_name: :b ├── write_name: :b= ├── operator: :* ├── operator_loc: (1,5)-(1,7) = "*=" └── value: @ CallNode (location: (1,8)-(1,11)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -23,18 +24,17 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,10)-(1,11)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :d - │ │ ├── message_loc: (1,10)-(1,11) = "d" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,10)-(1,11)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :d + │ ├── message_loc: (1,10)-(1,11) = "d" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt b/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt index 4e35a7d827..afd48a88f8 100644 --- a/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt +++ b/test/prism/snapshots/seattlerb/op_asgn_val_dot_ident_command_call.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallOrWriteNode (location: (1,0)-(1,11)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,16 +15,15 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── message_loc: (1,2)-(1,3) = "b" - ├── flags: ∅ ├── read_name: :b ├── write_name: :b= ├── operator_loc: (1,4)-(1,7) = "||=" └── value: @ CallNode (location: (1,8)-(1,11)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -30,10 +31,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,10)-(1,11)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,10)-(1,11)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt index 3342f56ff9..10f788a271 100644 --- a/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt +++ b/test/prism/snapshots/seattlerb/parse_if_not_canonical.txt @@ -7,10 +7,13 @@ ├── if_keyword_loc: (1,0)-(1,2) = "if" ├── predicate: │ @ CallNode (location: (1,3)-(1,15)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,7)-(1,15)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (1,7)-(1,10)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :var @@ -18,24 +21,21 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (1,10)-(1,11) = "." │ │ ├── name: :nil? │ │ ├── message_loc: (1,11)-(1,15) = "nil?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :! │ ├── message_loc: (1,3)-(1,6) = "not" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── then_keyword_loc: (1,16)-(1,20) = "then" ├── statements: │ @ StatementsNode (location: (1,21)-(1,26)) diff --git a/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt index 3342f56ff9..10f788a271 100644 --- a/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt +++ b/test/prism/snapshots/seattlerb/parse_if_not_noncanonical.txt @@ -7,10 +7,13 @@ ├── if_keyword_loc: (1,0)-(1,2) = "if" ├── predicate: │ @ CallNode (location: (1,3)-(1,15)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,7)-(1,15)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (1,7)-(1,10)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :var @@ -18,24 +21,21 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (1,10)-(1,11) = "." │ │ ├── name: :nil? │ │ ├── message_loc: (1,11)-(1,15) = "nil?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :! │ ├── message_loc: (1,3)-(1,6) = "not" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ ├── then_keyword_loc: (1,16)-(1,20) = "then" ├── statements: │ @ StatementsNode (location: (1,21)-(1,26)) diff --git a/test/prism/snapshots/seattlerb/parse_line_block.txt b/test/prism/snapshots/seattlerb/parse_line_block.txt index e0d46ffeb3..ba579a280a 100644 --- a/test/prism/snapshots/seattlerb/parse_line_block.txt +++ b/test/prism/snapshots/seattlerb/parse_line_block.txt @@ -12,6 +12,7 @@ │ │ └── flags: decimal │ └── operator_loc: (1,2)-(1,3) = "=" └── @ CallNode (location: (2,0)-(2,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :p @@ -19,11 +20,10 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (2,2)-(2,3)) - │ ├── arguments: (length: 1) - │ │ └── @ LocalVariableReadNode (location: (2,2)-(2,3)) - │ │ ├── name: :a - │ │ └── depth: 0 - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LocalVariableReadNode (location: (2,2)-(2,3)) + │ ├── name: :a + │ └── depth: 0 ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt index f8fc06ed97..5b4c006eff 100644 --- a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt +++ b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(3,1)) └── body: (length: 3) ├── @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,9 +12,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── @ CallNode (location: (2,0)-(2,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :b @@ -21,9 +22,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ └── @ CallNode (location: (3,0)-(3,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt index b51919ae36..ddabbe84e4 100644 --- a/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt +++ b/test/prism/snapshots/seattlerb/parse_line_block_inline_comment_leading_newlines.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (4,0)-(7,1)) └── body: (length: 3) ├── @ CallNode (location: (4,0)-(4,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,9 +12,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── @ CallNode (location: (5,0)-(5,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :b @@ -21,9 +22,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ └── @ CallNode (location: (7,0)-(7,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt b/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt index 97feaf3bf6..7a55397bac 100644 --- a/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt +++ b/test/prism/snapshots/seattlerb/parse_line_block_inline_multiline_comment.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,1)) └── body: (length: 3) ├── @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,9 +12,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── @ CallNode (location: (2,0)-(2,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :b @@ -21,9 +22,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ └── @ CallNode (location: (4,0)-(4,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -31,5 +32,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt b/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt index 21ea5368db..991e3a1685 100644 --- a/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt +++ b/test/prism/snapshots/seattlerb/parse_line_call_ivar_arg_no_parens_line_break.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,4)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,10 +12,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,4)) - │ ├── arguments: (length: 1) - │ │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4)) - │ │ └── name: :@b - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4)) + │ └── name: :@b ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt b/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt index 9fc496ef94..15af12fe83 100644 --- a/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt +++ b/test/prism/snapshots/seattlerb/parse_line_call_ivar_line_break_paren.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(2,1)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(2,1)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,10 +12,9 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,4)) - │ ├── arguments: (length: 1) - │ │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4)) - │ │ └── name: :@b - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ InstanceVariableReadNode (location: (1,2)-(1,4)) + │ └── name: :@b ├── closing_loc: (2,0)-(2,1) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt index 557fcd6546..8a07a8912c 100644 --- a/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt +++ b/test/prism/snapshots/seattlerb/parse_line_call_no_args.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,50 +12,49 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,2)-(3,3)) - │ ├── locals: [:x, :y] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,5)-(1,11)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,6)-(1,10)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) - │ │ │ │ │ └── name: :x - │ │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ └── name: :y - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,5)-(1,6) = "|" - │ │ └── closing_loc: (1,10)-(1,11) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (2,2)-(2,7)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (2,2)-(2,7)) - │ │ ├── receiver: - │ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3)) - │ │ │ ├── name: :x - │ │ │ └── depth: 0 - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :+ - │ │ ├── message_loc: (2,4)-(2,5) = "+" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (2,6)-(2,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7)) - │ │ │ │ ├── name: :y - │ │ │ │ └── depth: 0 - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ ├── opening_loc: (1,2)-(1,4) = "do" - │ └── closing_loc: (3,0)-(3,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,2)-(3,3)) + ├── locals: [:x, :y] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,5)-(1,11)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,6)-(1,10)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,6)-(1,7)) + │ │ │ │ └── name: :x + │ │ │ └── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ └── name: :y + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,5)-(1,6) = "|" + │ └── closing_loc: (1,10)-(1,11) = "|" + ├── body: + │ @ StatementsNode (location: (2,2)-(2,7)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (2,2)-(2,7)) + │ ├── flags: ∅ + │ ├── receiver: + │ │ @ LocalVariableReadNode (location: (2,2)-(2,3)) + │ │ ├── name: :x + │ │ └── depth: 0 + │ ├── call_operator_loc: ∅ + │ ├── name: :+ + │ ├── message_loc: (2,4)-(2,5) = "+" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (2,6)-(2,7)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7)) + │ │ ├── name: :y + │ │ └── depth: 0 + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,2)-(1,4) = "do" + └── closing_loc: (3,0)-(3,3) = "end" diff --git a/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt index dda6852a0f..0ec63b3123 100644 --- a/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt +++ b/test/prism/snapshots/seattlerb/parse_line_defn_complex.txt @@ -22,6 +22,7 @@ │ @ StatementsNode (location: (2,2)-(4,10)) │ └── body: (length: 3) │ ├── @ CallNode (location: (2,2)-(2,6)) + │ │ ├── flags: ∅ │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :p @@ -29,14 +30,13 @@ │ │ ├── opening_loc: (2,3)-(2,4) = "(" │ │ ├── arguments: │ │ │ @ ArgumentsNode (location: (2,4)-(2,5)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ LocalVariableReadNode (location: (2,4)-(2,5)) - │ │ │ │ ├── name: :y - │ │ │ │ └── depth: 0 - │ │ │ └── flags: ∅ + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ LocalVariableReadNode (location: (2,4)-(2,5)) + │ │ │ ├── name: :y + │ │ │ └── depth: 0 │ │ ├── closing_loc: (2,5)-(2,6) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── @ LocalVariableOperatorWriteNode (location: (3,2)-(3,8)) │ │ ├── name_loc: (3,2)-(3,3) = "y" │ │ ├── operator_loc: (3,4)-(3,6) = "*=" @@ -50,11 +50,11 @@ │ ├── keyword_loc: (4,2)-(4,8) = "return" │ └── arguments: │ @ ArgumentsNode (location: (4,9)-(4,10)) - │ ├── arguments: (length: 1) - │ │ └── @ LocalVariableReadNode (location: (4,9)-(4,10)) - │ │ ├── name: :y - │ │ └── depth: 0 - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LocalVariableReadNode (location: (4,9)-(4,10)) + │ ├── name: :y + │ └── depth: 0 ├── locals: [:y] ├── locals_body_index: 1 ├── def_keyword_loc: (1,0)-(1,3) = "def" diff --git a/test/prism/snapshots/seattlerb/parse_line_dot2.txt b/test/prism/snapshots/seattlerb/parse_line_dot2.txt index 51276d2107..960369cfa5 100644 --- a/test/prism/snapshots/seattlerb/parse_line_dot2.txt +++ b/test/prism/snapshots/seattlerb/parse_line_dot2.txt @@ -4,17 +4,19 @@ @ StatementsNode (location: (1,0)-(5,1)) └── body: (length: 3) ├── @ RangeNode (location: (1,0)-(2,1)) + │ ├── flags: ∅ │ ├── left: │ │ @ IntegerNode (location: (1,0)-(1,1)) │ │ └── flags: decimal │ ├── right: │ │ @ IntegerNode (location: (2,0)-(2,1)) │ │ └── flags: decimal - │ ├── operator_loc: (1,1)-(1,3) = ".." - │ └── flags: ∅ + │ └── operator_loc: (1,1)-(1,3) = ".." ├── @ RangeNode (location: (3,0)-(4,1)) + │ ├── flags: ∅ │ ├── left: │ │ @ CallNode (location: (3,0)-(3,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -22,10 +24,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── right: │ │ @ CallNode (location: (4,0)-(4,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -33,11 +35,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── operator_loc: (3,1)-(3,3) = ".." - │ └── flags: ∅ + │ │ └── block: ∅ + │ └── operator_loc: (3,1)-(3,3) = ".." └── @ CallNode (location: (5,0)-(5,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -45,5 +46,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt b/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt index 7383c1f88c..986f57136e 100644 --- a/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt +++ b/test/prism/snapshots/seattlerb/parse_line_dot2_open.txt @@ -4,15 +4,17 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 3) ├── @ RangeNode (location: (1,0)-(1,3)) + │ ├── flags: ∅ │ ├── left: │ │ @ IntegerNode (location: (1,0)-(1,1)) │ │ └── flags: decimal │ ├── right: ∅ - │ ├── operator_loc: (1,1)-(1,3) = ".." - │ └── flags: ∅ + │ └── operator_loc: (1,1)-(1,3) = ".." ├── @ RangeNode (location: (2,2)-(2,5)) + │ ├── flags: ∅ │ ├── left: │ │ @ CallNode (location: (2,2)-(2,3)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -20,12 +22,11 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── right: ∅ - │ ├── operator_loc: (2,3)-(2,5) = ".." - │ └── flags: ∅ + │ └── operator_loc: (2,3)-(2,5) = ".." └── @ CallNode (location: (3,2)-(3,3)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -33,5 +34,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_dot3.txt b/test/prism/snapshots/seattlerb/parse_line_dot3.txt index 87b6642040..791618812d 100644 --- a/test/prism/snapshots/seattlerb/parse_line_dot3.txt +++ b/test/prism/snapshots/seattlerb/parse_line_dot3.txt @@ -4,17 +4,19 @@ @ StatementsNode (location: (1,0)-(5,1)) └── body: (length: 3) ├── @ RangeNode (location: (1,0)-(2,1)) + │ ├── flags: exclude_end │ ├── left: │ │ @ IntegerNode (location: (1,0)-(1,1)) │ │ └── flags: decimal │ ├── right: │ │ @ IntegerNode (location: (2,0)-(2,1)) │ │ └── flags: decimal - │ ├── operator_loc: (1,1)-(1,4) = "..." - │ └── flags: exclude_end + │ └── operator_loc: (1,1)-(1,4) = "..." ├── @ RangeNode (location: (3,0)-(4,1)) + │ ├── flags: exclude_end │ ├── left: │ │ @ CallNode (location: (3,0)-(3,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -22,10 +24,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── right: │ │ @ CallNode (location: (4,0)-(4,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -33,11 +35,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ ├── operator_loc: (3,1)-(3,4) = "..." - │ └── flags: exclude_end + │ │ └── block: ∅ + │ └── operator_loc: (3,1)-(3,4) = "..." └── @ CallNode (location: (5,0)-(5,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -45,5 +46,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt b/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt index 639917b5dc..49ce1b0bae 100644 --- a/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt +++ b/test/prism/snapshots/seattlerb/parse_line_dot3_open.txt @@ -4,15 +4,17 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 3) ├── @ RangeNode (location: (1,0)-(1,4)) + │ ├── flags: exclude_end │ ├── left: │ │ @ IntegerNode (location: (1,0)-(1,1)) │ │ └── flags: decimal │ ├── right: ∅ - │ ├── operator_loc: (1,1)-(1,4) = "..." - │ └── flags: exclude_end + │ └── operator_loc: (1,1)-(1,4) = "..." ├── @ RangeNode (location: (2,2)-(2,6)) + │ ├── flags: exclude_end │ ├── left: │ │ @ CallNode (location: (2,2)-(2,3)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -20,12 +22,11 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── right: ∅ - │ ├── operator_loc: (2,3)-(2,6) = "..." - │ └── flags: exclude_end + │ └── operator_loc: (2,3)-(2,6) = "..." └── @ CallNode (location: (3,2)-(3,3)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :c @@ -33,5 +34,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt b/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt index 28d126b840..9a6cbfdb65 100644 --- a/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt +++ b/test/prism/snapshots/seattlerb/parse_line_evstr_after_break.txt @@ -21,6 +21,7 @@ │ │ │ @ StatementsNode (location: (2,3)-(2,4)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (2,3)-(2,4)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :b @@ -28,8 +29,7 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (2,4)-(2,5) = "}" │ └── closing_loc: (2,5)-(2,6) = "\"" └── closing_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt index 8e5a8598d2..2b52a3b6fb 100644 --- a/test/prism/snapshots/seattlerb/parse_line_heredoc.txt +++ b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt @@ -9,6 +9,7 @@ │ ├── name_loc: (1,6)-(1,12) = "string" │ ├── value: │ │ @ CallNode (location: (1,15)-(1,31)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ StringNode (location: (1,15)-(1,25)) │ │ │ ├── flags: ∅ @@ -22,10 +23,10 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ └── operator_loc: (1,13)-(1,14) = "=" └── @ CallNode (location: (4,6)-(4,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :puts @@ -33,11 +34,10 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (4,11)-(4,17)) - │ ├── arguments: (length: 1) - │ │ └── @ LocalVariableReadNode (location: (4,11)-(4,17)) - │ │ ├── name: :string - │ │ └── depth: 0 - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LocalVariableReadNode (location: (4,11)-(4,17)) + │ ├── name: :string + │ └── depth: 0 ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt index 120560084a..0a96830a65 100644 --- a/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt +++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt @@ -18,6 +18,7 @@ │ │ │ @ StatementsNode (location: (3,2)-(3,3)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (3,2)-(3,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :b @@ -25,8 +26,7 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (3,3)-(3,4) = "}" │ └── @ StringNode (location: (3,4)-(4,0)) │ ├── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt index b77d79519b..c762376f14 100644 --- a/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt +++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt @@ -16,6 +16,7 @@ │ │ └── unescaped: " very long string\n" │ └── operator_loc: (1,13)-(1,14) = "=" └── @ CallNode (location: (4,6)-(4,17)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :puts @@ -23,11 +24,10 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (4,11)-(4,17)) - │ ├── arguments: (length: 1) - │ │ └── @ LocalVariableReadNode (location: (4,11)-(4,17)) - │ │ ├── name: :string - │ │ └── depth: 0 - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LocalVariableReadNode (location: (4,11)-(4,17)) + │ ├── name: :string + │ └── depth: 0 ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt b/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt index fc36ac7a5c..a22d252918 100644 --- a/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt +++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_no_parens.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,63 +12,62 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,3)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,2)-(1,3)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :a - │ │ ├── message_loc: (1,2)-(1,3) = "a" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,2)-(1,3)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :a + │ ├── message_loc: (1,2)-(1,3) = "a" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,4)-(3,3)) - │ ├── locals: [:x, :y] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,7)-(1,13)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,8)-(1,12)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,8)-(1,9)) - │ │ │ │ │ └── name: :x - │ │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12)) - │ │ │ │ └── name: :y - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,7)-(1,8) = "|" - │ │ └── closing_loc: (1,12)-(1,13) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (2,2)-(2,7)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (2,2)-(2,7)) - │ │ ├── receiver: - │ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3)) - │ │ │ ├── name: :x - │ │ │ └── depth: 0 - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :+ - │ │ ├── message_loc: (2,4)-(2,5) = "+" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (2,6)-(2,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7)) - │ │ │ │ ├── name: :y - │ │ │ │ └── depth: 0 - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ ├── opening_loc: (1,4)-(1,6) = "do" - │ └── closing_loc: (3,0)-(3,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,4)-(3,3)) + ├── locals: [:x, :y] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,7)-(1,13)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,8)-(1,12)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,8)-(1,9)) + │ │ │ │ └── name: :x + │ │ │ └── @ RequiredParameterNode (location: (1,11)-(1,12)) + │ │ │ └── name: :y + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,7)-(1,8) = "|" + │ └── closing_loc: (1,12)-(1,13) = "|" + ├── body: + │ @ StatementsNode (location: (2,2)-(2,7)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (2,2)-(2,7)) + │ ├── flags: ∅ + │ ├── receiver: + │ │ @ LocalVariableReadNode (location: (2,2)-(2,3)) + │ │ ├── name: :x + │ │ └── depth: 0 + │ ├── call_operator_loc: ∅ + │ ├── name: :+ + │ ├── message_loc: (2,4)-(2,5) = "+" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (2,6)-(2,7)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7)) + │ │ ├── name: :y + │ │ └── depth: 0 + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,4)-(1,6) = "do" + └── closing_loc: (3,0)-(3,3) = "end" diff --git a/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt index ad318e4b05..e9a7b0140d 100644 --- a/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt +++ b/test/prism/snapshots/seattlerb/parse_line_iter_call_parens.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :f @@ -11,63 +12,62 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,3)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (1,2)-(1,3)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :a - │ │ ├── message_loc: (1,2)-(1,3) = "a" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (1,2)-(1,3)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :a + │ ├── message_loc: (1,2)-(1,3) = "a" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: (1,3)-(1,4) = ")" - ├── block: - │ @ BlockNode (location: (1,5)-(3,3)) - │ ├── locals: [:x, :y] - │ ├── locals_body_index: 2 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,8)-(1,14)) - │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (1,9)-(1,13)) - │ │ │ ├── requireds: (length: 2) - │ │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10)) - │ │ │ │ │ └── name: :x - │ │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) - │ │ │ │ └── name: :y - │ │ │ ├── optionals: (length: 0) - │ │ │ ├── rest: ∅ - │ │ │ ├── posts: (length: 0) - │ │ │ ├── keywords: (length: 0) - │ │ │ ├── keyword_rest: ∅ - │ │ │ └── block: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,8)-(1,9) = "|" - │ │ └── closing_loc: (1,13)-(1,14) = "|" - │ ├── body: - │ │ @ StatementsNode (location: (2,2)-(2,7)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (2,2)-(2,7)) - │ │ ├── receiver: - │ │ │ @ LocalVariableReadNode (location: (2,2)-(2,3)) - │ │ │ ├── name: :x - │ │ │ └── depth: 0 - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :+ - │ │ ├── message_loc: (2,4)-(2,5) = "+" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (2,6)-(2,7)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7)) - │ │ │ │ ├── name: :y - │ │ │ │ └── depth: 0 - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ ├── opening_loc: (1,5)-(1,7) = "do" - │ └── closing_loc: (3,0)-(3,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,5)-(3,3)) + ├── locals: [:x, :y] + ├── locals_body_index: 2 + ├── parameters: + │ @ BlockParametersNode (location: (1,8)-(1,14)) + │ ├── parameters: + │ │ @ ParametersNode (location: (1,9)-(1,13)) + │ │ ├── requireds: (length: 2) + │ │ │ ├── @ RequiredParameterNode (location: (1,9)-(1,10)) + │ │ │ │ └── name: :x + │ │ │ └── @ RequiredParameterNode (location: (1,12)-(1,13)) + │ │ │ └── name: :y + │ │ ├── optionals: (length: 0) + │ │ ├── rest: ∅ + │ │ ├── posts: (length: 0) + │ │ ├── keywords: (length: 0) + │ │ ├── keyword_rest: ∅ + │ │ └── block: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,8)-(1,9) = "|" + │ └── closing_loc: (1,13)-(1,14) = "|" + ├── body: + │ @ StatementsNode (location: (2,2)-(2,7)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (2,2)-(2,7)) + │ ├── flags: ∅ + │ ├── receiver: + │ │ @ LocalVariableReadNode (location: (2,2)-(2,3)) + │ │ ├── name: :x + │ │ └── depth: 0 + │ ├── call_operator_loc: ∅ + │ ├── name: :+ + │ ├── message_loc: (2,4)-(2,5) = "+" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (2,6)-(2,7)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ LocalVariableReadNode (location: (2,6)-(2,7)) + │ │ ├── name: :y + │ │ └── depth: 0 + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── opening_loc: (1,5)-(1,7) = "do" + └── closing_loc: (3,0)-(3,3) = "end" diff --git a/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt b/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt index 46378fa9c4..63d52a477d 100644 --- a/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt +++ b/test/prism/snapshots/seattlerb/parse_line_op_asgn.txt @@ -8,6 +8,7 @@ │ ├── operator_loc: (1,10)-(1,12) = "+=" │ ├── value: │ │ @ CallNode (location: (2,8)-(2,11)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :bar @@ -15,12 +16,12 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── name: :foo │ ├── operator: :+ │ └── depth: 0 └── @ CallNode (location: (3,6)-(3,9)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :baz @@ -28,5 +29,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_postexe.txt b/test/prism/snapshots/seattlerb/parse_line_postexe.txt index 37114601aa..3a5e0f084e 100644 --- a/test/prism/snapshots/seattlerb/parse_line_postexe.txt +++ b/test/prism/snapshots/seattlerb/parse_line_postexe.txt @@ -8,6 +8,7 @@ │ @ StatementsNode (location: (2,0)-(2,3)) │ └── body: (length: 1) │ └── @ CallNode (location: (2,0)-(2,3)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :foo @@ -15,8 +16,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── keyword_loc: (1,0)-(1,3) = "END" ├── opening_loc: (1,4)-(1,5) = "{" └── closing_loc: (3,0)-(3,1) = "}" diff --git a/test/prism/snapshots/seattlerb/parse_line_preexe.txt b/test/prism/snapshots/seattlerb/parse_line_preexe.txt index 9de912be8f..71ca121314 100644 --- a/test/prism/snapshots/seattlerb/parse_line_preexe.txt +++ b/test/prism/snapshots/seattlerb/parse_line_preexe.txt @@ -8,6 +8,7 @@ │ @ StatementsNode (location: (2,0)-(2,3)) │ └── body: (length: 1) │ └── @ CallNode (location: (2,0)-(2,3)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :foo @@ -15,8 +16,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── keyword_loc: (1,0)-(1,5) = "BEGIN" ├── opening_loc: (1,6)-(1,7) = "{" └── closing_loc: (3,0)-(3,1) = "}" diff --git a/test/prism/snapshots/seattlerb/parse_line_rescue.txt b/test/prism/snapshots/seattlerb/parse_line_rescue.txt index d269c2e820..a13ef4357d 100644 --- a/test/prism/snapshots/seattlerb/parse_line_rescue.txt +++ b/test/prism/snapshots/seattlerb/parse_line_rescue.txt @@ -9,6 +9,7 @@ │ @ StatementsNode (location: (2,2)-(2,3)) │ └── body: (length: 1) │ └── @ CallNode (location: (2,2)-(2,3)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -16,8 +17,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── rescue_clause: │ @ RescueNode (location: (3,0)-(6,3)) │ ├── keyword_loc: (3,0)-(3,6) = "rescue" @@ -28,6 +28,7 @@ │ │ @ StatementsNode (location: (4,2)-(4,3)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (4,2)-(4,3)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -35,8 +36,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── consequent: │ @ RescueNode (location: (5,0)-(6,3)) │ ├── keyword_loc: (5,0)-(5,6) = "rescue" @@ -47,6 +47,7 @@ │ │ @ StatementsNode (location: (6,2)-(6,3)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (6,2)-(6,3)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :c @@ -54,8 +55,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── consequent: ∅ ├── else_clause: ∅ ├── ensure_clause: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_return.txt b/test/prism/snapshots/seattlerb/parse_line_return.txt index 46312194d5..fc83061d01 100644 --- a/test/prism/snapshots/seattlerb/parse_line_return.txt +++ b/test/prism/snapshots/seattlerb/parse_line_return.txt @@ -23,10 +23,10 @@ │ │ ├── keyword_loc: (3,10)-(3,16) = "return" │ │ └── arguments: │ │ @ ArgumentsNode (location: (3,17)-(3,19)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (3,17)-(3,19)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (3,17)-(3,19)) + │ │ └── flags: decimal │ ├── consequent: ∅ │ └── end_keyword_loc: (4,8)-(4,11) = "end" ├── locals: [] diff --git a/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt b/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt index c0b4f6cd3d..ee1fa91116 100644 --- a/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt +++ b/test/prism/snapshots/seattlerb/parse_line_str_with_newline_escape.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,15 +12,14 @@ ├── opening_loc: (1,1)-(1,2) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,12)) - │ ├── arguments: (length: 2) - │ │ ├── @ StringNode (location: (1,2)-(1,6)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "\"" - │ │ │ ├── content_loc: (1,3)-(1,5) = "\\n" - │ │ │ ├── closing_loc: (1,5)-(1,6) = "\"" - │ │ │ └── unescaped: "\n" - │ │ └── @ TrueNode (location: (1,8)-(1,12)) - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ StringNode (location: (1,2)-(1,6)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "\"" + │ │ ├── content_loc: (1,3)-(1,5) = "\\n" + │ │ ├── closing_loc: (1,5)-(1,6) = "\"" + │ │ └── unescaped: "\n" + │ └── @ TrueNode (location: (1,8)-(1,12)) ├── closing_loc: (1,12)-(1,13) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_to_ary.txt b/test/prism/snapshots/seattlerb/parse_line_to_ary.txt index bedd6611f9..c0a7a6f631 100644 --- a/test/prism/snapshots/seattlerb/parse_line_to_ary.txt +++ b/test/prism/snapshots/seattlerb/parse_line_to_ary.txt @@ -18,6 +18,7 @@ │ ├── operator_loc: (2,2)-(2,3) = "=" │ └── value: │ @ CallNode (location: (2,4)-(2,5)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :c @@ -25,9 +26,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ └── @ CallNode (location: (3,0)-(3,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :d @@ -35,5 +36,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt b/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt index ab15f51526..355a0da11c 100644 --- a/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt +++ b/test/prism/snapshots/seattlerb/parse_line_trailing_newlines.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(2,1)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,9 +12,9 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ └── @ CallNode (location: (2,0)-(2,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -21,5 +22,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt b/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt index 5624d07a73..528ade93a7 100644 --- a/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt +++ b/test/prism/snapshots/seattlerb/parse_opt_call_args_assocs_comma.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,8)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,18 +14,17 @@ ├── opening_loc: (1,1)-(1,2) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,2)-(1,6)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,2)-(1,6)) - │ │ ├── key: - │ │ │ @ IntegerNode (location: (1,2)-(1,3)) - │ │ │ └── flags: decimal - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,5)-(1,6)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,3)-(1,5) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,2)-(1,6)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,2)-(1,6)) + │ ├── key: + │ │ @ IntegerNode (location: (1,2)-(1,3)) + │ │ └── flags: decimal + │ ├── value: + │ │ @ IntegerNode (location: (1,5)-(1,6)) + │ │ └── flags: decimal + │ └── operator_loc: (1,3)-(1,5) = "=>" ├── closing_loc: (1,7)-(1,8) = "]" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt b/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt index a16635a0eb..c1d086d5f3 100644 --- a/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt +++ b/test/prism/snapshots/seattlerb/parse_opt_call_args_lit_comma.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ └── flags: decimal @@ -13,10 +14,9 @@ ├── opening_loc: (1,1)-(1,2) = "[" ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,3)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,2)-(1,3)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,2)-(1,3)) + │ └── flags: decimal ├── closing_loc: (1,4)-(1,5) = "]" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_pattern_019.txt b/test/prism/snapshots/seattlerb/parse_pattern_019.txt index 196cb186b9..2ba406f186 100644 --- a/test/prism/snapshots/seattlerb/parse_pattern_019.txt +++ b/test/prism/snapshots/seattlerb/parse_pattern_019.txt @@ -11,14 +11,14 @@ │ └── @ InNode (location: (2,0)-(3,6)) │ ├── pattern: │ │ @ RangeNode (location: (2,3)-(2,8)) + │ │ ├── flags: ∅ │ │ ├── left: │ │ │ @ IntegerNode (location: (2,3)-(2,5)) │ │ │ └── flags: decimal │ │ ├── right: │ │ │ @ IntegerNode (location: (2,7)-(2,8)) │ │ │ └── flags: decimal - │ │ ├── operator_loc: (2,5)-(2,7) = ".." - │ │ └── flags: ∅ + │ │ └── operator_loc: (2,5)-(2,7) = ".." │ ├── statements: │ │ @ StatementsNode (location: (3,2)-(3,6)) │ │ └── body: (length: 1) diff --git a/test/prism/snapshots/seattlerb/parse_pattern_044.txt b/test/prism/snapshots/seattlerb/parse_pattern_044.txt index 36189b756d..1eeb954839 100644 --- a/test/prism/snapshots/seattlerb/parse_pattern_044.txt +++ b/test/prism/snapshots/seattlerb/parse_pattern_044.txt @@ -6,6 +6,7 @@ └── @ CaseMatchNode (location: (1,0)-(4,3)) ├── predicate: │ @ CallNode (location: (1,5)-(1,8)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :obj @@ -13,8 +14,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── conditions: (length: 1) │ └── @ InNode (location: (2,0)-(3,6)) │ ├── pattern: diff --git a/test/prism/snapshots/seattlerb/parse_pattern_051.txt b/test/prism/snapshots/seattlerb/parse_pattern_051.txt index 6067c109e1..6ae0944d10 100644 --- a/test/prism/snapshots/seattlerb/parse_pattern_051.txt +++ b/test/prism/snapshots/seattlerb/parse_pattern_051.txt @@ -6,6 +6,7 @@ └── @ CaseMatchNode (location: (1,0)-(4,3)) ├── predicate: │ @ ArrayNode (location: (1,5)-(1,14)) + │ ├── flags: ∅ │ ├── elements: (length: 3) │ │ ├── @ IntegerNode (location: (1,6)-(1,7)) │ │ │ └── flags: decimal @@ -14,8 +15,7 @@ │ │ └── @ IntegerNode (location: (1,12)-(1,13)) │ │ └── flags: decimal │ ├── opening_loc: (1,5)-(1,6) = "[" - │ ├── closing_loc: (1,13)-(1,14) = "]" - │ └── flags: ∅ + │ └── closing_loc: (1,13)-(1,14) = "]" ├── conditions: (length: 1) │ └── @ InNode (location: (2,0)-(3,6)) │ ├── pattern: diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058.txt b/test/prism/snapshots/seattlerb/parse_pattern_058.txt index 4dee865a2b..830cdaef1d 100644 --- a/test/prism/snapshots/seattlerb/parse_pattern_058.txt +++ b/test/prism/snapshots/seattlerb/parse_pattern_058.txt @@ -48,6 +48,7 @@ │ │ @ StatementsNode (location: (3,2)-(3,11)) │ │ └── body: (length: 1) │ │ └── @ ArrayNode (location: (3,2)-(3,11)) + │ │ ├── flags: ∅ │ │ ├── elements: (length: 2) │ │ │ ├── @ LocalVariableReadNode (location: (3,3)-(3,4)) │ │ │ │ ├── name: :a @@ -56,8 +57,7 @@ │ │ │ ├── name: :rest │ │ │ └── depth: 0 │ │ ├── opening_loc: (3,2)-(3,3) = "[" - │ │ ├── closing_loc: (3,10)-(3,11) = "]" - │ │ └── flags: ∅ + │ │ └── closing_loc: (3,10)-(3,11) = "]" │ ├── in_loc: (2,0)-(2,2) = "in" │ └── then_loc: ∅ ├── consequent: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt index f55300e6d1..18f3bde6aa 100644 --- a/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt +++ b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt @@ -45,13 +45,13 @@ │ │ @ StatementsNode (location: (3,2)-(3,5)) │ │ └── body: (length: 1) │ │ └── @ ArrayNode (location: (3,2)-(3,5)) + │ │ ├── flags: ∅ │ │ ├── elements: (length: 1) │ │ │ └── @ LocalVariableReadNode (location: (3,3)-(3,4)) │ │ │ ├── name: :a │ │ │ └── depth: 0 │ │ ├── opening_loc: (3,2)-(3,3) = "[" - │ │ ├── closing_loc: (3,4)-(3,5) = "]" - │ │ └── flags: ∅ + │ │ └── closing_loc: (3,4)-(3,5) = "]" │ ├── in_loc: (2,0)-(2,2) = "in" │ └── then_loc: ∅ ├── consequent: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt index f7544713f1..71002ef207 100644 --- a/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt +++ b/test/prism/snapshots/seattlerb/parse_until_not_canonical.txt @@ -4,14 +4,18 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ UntilNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── keyword_loc: (1,0)-(1,5) = "until" ├── closing_loc: (3,0)-(3,3) = "end" ├── predicate: │ @ CallNode (location: (1,6)-(1,18)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,10)-(1,18)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (1,10)-(1,13)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :var @@ -19,31 +23,27 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (1,13)-(1,14) = "." │ │ ├── name: :nil? │ │ ├── message_loc: (1,14)-(1,18) = "nil?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :! │ ├── message_loc: (1,6)-(1,9) = "not" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ - ├── statements: - │ @ StatementsNode (location: (2,2)-(2,7)) - │ └── body: (length: 1) - │ └── @ StringNode (location: (2,2)-(2,7)) - │ ├── flags: ∅ - │ ├── opening_loc: (2,2)-(2,3) = "'" - │ ├── content_loc: (2,3)-(2,6) = "foo" - │ ├── closing_loc: (2,6)-(2,7) = "'" - │ └── unescaped: "foo" - └── flags: ∅ + │ └── block: ∅ + └── statements: + @ StatementsNode (location: (2,2)-(2,7)) + └── body: (length: 1) + └── @ StringNode (location: (2,2)-(2,7)) + ├── flags: ∅ + ├── opening_loc: (2,2)-(2,3) = "'" + ├── content_loc: (2,3)-(2,6) = "foo" + ├── closing_loc: (2,6)-(2,7) = "'" + └── unescaped: "foo" diff --git a/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt index f7544713f1..71002ef207 100644 --- a/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt +++ b/test/prism/snapshots/seattlerb/parse_until_not_noncanonical.txt @@ -4,14 +4,18 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ UntilNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── keyword_loc: (1,0)-(1,5) = "until" ├── closing_loc: (3,0)-(3,3) = "end" ├── predicate: │ @ CallNode (location: (1,6)-(1,18)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,10)-(1,18)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (1,10)-(1,13)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :var @@ -19,31 +23,27 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (1,13)-(1,14) = "." │ │ ├── name: :nil? │ │ ├── message_loc: (1,14)-(1,18) = "nil?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :! │ ├── message_loc: (1,6)-(1,9) = "not" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ - ├── statements: - │ @ StatementsNode (location: (2,2)-(2,7)) - │ └── body: (length: 1) - │ └── @ StringNode (location: (2,2)-(2,7)) - │ ├── flags: ∅ - │ ├── opening_loc: (2,2)-(2,3) = "'" - │ ├── content_loc: (2,3)-(2,6) = "foo" - │ ├── closing_loc: (2,6)-(2,7) = "'" - │ └── unescaped: "foo" - └── flags: ∅ + │ └── block: ∅ + └── statements: + @ StatementsNode (location: (2,2)-(2,7)) + └── body: (length: 1) + └── @ StringNode (location: (2,2)-(2,7)) + ├── flags: ∅ + ├── opening_loc: (2,2)-(2,3) = "'" + ├── content_loc: (2,3)-(2,6) = "foo" + ├── closing_loc: (2,6)-(2,7) = "'" + └── unescaped: "foo" diff --git a/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt b/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt index e745a865c9..973d32fe39 100644 --- a/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt +++ b/test/prism/snapshots/seattlerb/parse_while_not_canonical.txt @@ -4,14 +4,18 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ WhileNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── keyword_loc: (1,0)-(1,5) = "while" ├── closing_loc: (3,0)-(3,3) = "end" ├── predicate: │ @ CallNode (location: (1,6)-(1,18)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,10)-(1,18)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (1,10)-(1,13)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :var @@ -19,31 +23,27 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (1,13)-(1,14) = "." │ │ ├── name: :nil? │ │ ├── message_loc: (1,14)-(1,18) = "nil?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :! │ ├── message_loc: (1,6)-(1,9) = "not" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ - ├── statements: - │ @ StatementsNode (location: (2,2)-(2,7)) - │ └── body: (length: 1) - │ └── @ StringNode (location: (2,2)-(2,7)) - │ ├── flags: ∅ - │ ├── opening_loc: (2,2)-(2,3) = "'" - │ ├── content_loc: (2,3)-(2,6) = "foo" - │ ├── closing_loc: (2,6)-(2,7) = "'" - │ └── unescaped: "foo" - └── flags: ∅ + │ └── block: ∅ + └── statements: + @ StatementsNode (location: (2,2)-(2,7)) + └── body: (length: 1) + └── @ StringNode (location: (2,2)-(2,7)) + ├── flags: ∅ + ├── opening_loc: (2,2)-(2,3) = "'" + ├── content_loc: (2,3)-(2,6) = "foo" + ├── closing_loc: (2,6)-(2,7) = "'" + └── unescaped: "foo" diff --git a/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt b/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt index e745a865c9..973d32fe39 100644 --- a/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt +++ b/test/prism/snapshots/seattlerb/parse_while_not_noncanonical.txt @@ -4,14 +4,18 @@ @ StatementsNode (location: (1,0)-(3,3)) └── body: (length: 1) └── @ WhileNode (location: (1,0)-(3,3)) + ├── flags: ∅ ├── keyword_loc: (1,0)-(1,5) = "while" ├── closing_loc: (3,0)-(3,3) = "end" ├── predicate: │ @ CallNode (location: (1,6)-(1,18)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,10)-(1,18)) + │ │ ├── flags: ∅ │ │ ├── receiver: │ │ │ @ CallNode (location: (1,10)-(1,13)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :var @@ -19,31 +23,27 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ ├── call_operator_loc: (1,13)-(1,14) = "." │ │ ├── name: :nil? │ │ ├── message_loc: (1,14)-(1,18) = "nil?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ + │ │ └── block: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :! │ ├── message_loc: (1,6)-(1,9) = "not" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ - ├── statements: - │ @ StatementsNode (location: (2,2)-(2,7)) - │ └── body: (length: 1) - │ └── @ StringNode (location: (2,2)-(2,7)) - │ ├── flags: ∅ - │ ├── opening_loc: (2,2)-(2,3) = "'" - │ ├── content_loc: (2,3)-(2,6) = "foo" - │ ├── closing_loc: (2,6)-(2,7) = "'" - │ └── unescaped: "foo" - └── flags: ∅ + │ └── block: ∅ + └── statements: + @ StatementsNode (location: (2,2)-(2,7)) + └── body: (length: 1) + └── @ StringNode (location: (2,2)-(2,7)) + ├── flags: ∅ + ├── opening_loc: (2,2)-(2,3) = "'" + ├── content_loc: (2,3)-(2,6) = "foo" + ├── closing_loc: (2,6)-(2,7) = "'" + └── unescaped: "foo" diff --git a/test/prism/snapshots/seattlerb/pctW_lineno.txt b/test/prism/snapshots/seattlerb/pctW_lineno.txt index 6ec354bd0e..58efa9c59a 100644 --- a/test/prism/snapshots/seattlerb/pctW_lineno.txt +++ b/test/prism/snapshots/seattlerb/pctW_lineno.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,11)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(5,11)) + ├── flags: ∅ ├── elements: (length: 7) │ ├── @ StringNode (location: (1,3)-(1,7)) │ │ ├── flags: ∅ @@ -48,5 +49,4 @@ │ ├── closing_loc: ∅ │ └── unescaped: "iy" ├── opening_loc: (1,0)-(1,3) = "%W(" - ├── closing_loc: (5,10)-(5,11) = ")" - └── flags: ∅ + └── closing_loc: (5,10)-(5,11) = ")" diff --git a/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt index 5ce3fa6c55..946f08bc3c 100644 --- a/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt +++ b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,11)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(4,11)) + ├── flags: ∅ ├── elements: (length: 5) │ ├── @ StringNode (location: (1,4)-(1,5)) │ │ ├── flags: ∅ @@ -46,5 +47,4 @@ │ ├── closing_loc: ∅ │ └── unescaped: "5" ├── opening_loc: (1,0)-(1,3) = "%W(" - ├── closing_loc: (4,10)-(4,11) = ")" - └── flags: ∅ + └── closing_loc: (4,10)-(4,11) = ")" diff --git a/test/prism/snapshots/seattlerb/pipe_semicolon.txt b/test/prism/snapshots/seattlerb/pipe_semicolon.txt index 18e7d25a27..3b611021c8 100644 --- a/test/prism/snapshots/seattlerb/pipe_semicolon.txt +++ b/test/prism/snapshots/seattlerb/pipe_semicolon.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,18)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,18)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,27 +15,25 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :b ├── message_loc: (1,2)-(1,3) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,4)-(1,18)) - │ ├── locals: [:c] - │ ├── locals_body_index: 1 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,7)-(1,14)) - │ │ ├── parameters: ∅ - │ │ ├── locals: (length: 1) - │ │ │ └── @ BlockLocalVariableNode (location: (1,11)-(1,12)) - │ │ │ └── name: :c - │ │ ├── opening_loc: (1,7)-(1,8) = "|" - │ │ └── closing_loc: (1,13)-(1,14) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,4)-(1,6) = "do" - │ └── closing_loc: (1,15)-(1,18) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,4)-(1,18)) + ├── locals: [:c] + ├── locals_body_index: 1 + ├── parameters: + │ @ BlockParametersNode (location: (1,7)-(1,14)) + │ ├── parameters: ∅ + │ ├── locals: (length: 1) + │ │ └── @ BlockLocalVariableNode (location: (1,11)-(1,12)) + │ │ └── name: :c + │ ├── opening_loc: (1,7)-(1,8) = "|" + │ └── closing_loc: (1,13)-(1,14) = "|" + ├── body: ∅ + ├── opening_loc: (1,4)-(1,6) = "do" + └── closing_loc: (1,15)-(1,18) = "end" diff --git a/test/prism/snapshots/seattlerb/pipe_space.txt b/test/prism/snapshots/seattlerb/pipe_space.txt index c04ea4b775..c791d2b117 100644 --- a/test/prism/snapshots/seattlerb/pipe_space.txt +++ b/test/prism/snapshots/seattlerb/pipe_space.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,25 +15,23 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,2) = "." ├── name: :b ├── message_loc: (1,2)-(1,3) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,4)-(1,14)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: - │ │ @ BlockParametersNode (location: (1,7)-(1,10)) - │ │ ├── parameters: ∅ - │ │ ├── locals: (length: 0) - │ │ ├── opening_loc: (1,7)-(1,8) = "|" - │ │ └── closing_loc: (1,9)-(1,10) = "|" - │ ├── body: ∅ - │ ├── opening_loc: (1,4)-(1,6) = "do" - │ └── closing_loc: (1,11)-(1,14) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,4)-(1,14)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: + │ @ BlockParametersNode (location: (1,7)-(1,10)) + │ ├── parameters: ∅ + │ ├── locals: (length: 0) + │ ├── opening_loc: (1,7)-(1,8) = "|" + │ └── closing_loc: (1,9)-(1,10) = "|" + ├── body: ∅ + ├── opening_loc: (1,4)-(1,6) = "do" + └── closing_loc: (1,11)-(1,14) = "end" diff --git a/test/prism/snapshots/seattlerb/qWords_space.txt b/test/prism/snapshots/seattlerb/qWords_space.txt index d8ca822ac2..95ae6d4075 100644 --- a/test/prism/snapshots/seattlerb/qWords_space.txt +++ b/test/prism/snapshots/seattlerb/qWords_space.txt @@ -4,7 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── elements: (length: 0) ├── opening_loc: (1,0)-(1,3) = "%W(" - ├── closing_loc: (1,4)-(1,5) = ")" - └── flags: ∅ + └── closing_loc: (1,4)-(1,5) = ")" diff --git a/test/prism/snapshots/seattlerb/qsymbols.txt b/test/prism/snapshots/seattlerb/qsymbols.txt index b22155d271..fea12b646a 100644 --- a/test/prism/snapshots/seattlerb/qsymbols.txt +++ b/test/prism/snapshots/seattlerb/qsymbols.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,9)) + ├── flags: ∅ ├── elements: (length: 3) │ ├── @ SymbolNode (location: (1,3)-(1,4)) │ │ ├── opening_loc: ∅ @@ -21,5 +22,4 @@ │ ├── closing_loc: ∅ │ └── unescaped: "c" ├── opening_loc: (1,0)-(1,3) = "%I(" - ├── closing_loc: (1,8)-(1,9) = ")" - └── flags: ∅ + └── closing_loc: (1,8)-(1,9) = ")" diff --git a/test/prism/snapshots/seattlerb/qsymbols_empty.txt b/test/prism/snapshots/seattlerb/qsymbols_empty.txt index 8505453713..54aa3f77d7 100644 --- a/test/prism/snapshots/seattlerb/qsymbols_empty.txt +++ b/test/prism/snapshots/seattlerb/qsymbols_empty.txt @@ -4,7 +4,7 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,4)) + ├── flags: ∅ ├── elements: (length: 0) ├── opening_loc: (1,0)-(1,3) = "%I(" - ├── closing_loc: (1,3)-(1,4) = ")" - └── flags: ∅ + └── closing_loc: (1,3)-(1,4) = ")" diff --git a/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt b/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt index 46ef892d65..624b922ce6 100644 --- a/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt +++ b/test/prism/snapshots/seattlerb/qsymbols_empty_space.txt @@ -4,7 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── elements: (length: 0) ├── opening_loc: (1,0)-(1,3) = "%I(" - ├── closing_loc: (1,4)-(1,5) = ")" - └── flags: ∅ + └── closing_loc: (1,4)-(1,5) = ")" diff --git a/test/prism/snapshots/seattlerb/qsymbols_interp.txt b/test/prism/snapshots/seattlerb/qsymbols_interp.txt index 6e240759dd..67645c4053 100644 --- a/test/prism/snapshots/seattlerb/qsymbols_interp.txt +++ b/test/prism/snapshots/seattlerb/qsymbols_interp.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,15)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,15)) + ├── flags: ∅ ├── elements: (length: 3) │ ├── @ SymbolNode (location: (1,3)-(1,4)) │ │ ├── opening_loc: ∅ @@ -25,6 +26,7 @@ │ │ │ │ @ StatementsNode (location: (1,8)-(1,11)) │ │ │ │ └── body: (length: 1) │ │ │ │ └── @ CallNode (location: (1,8)-(1,11)) + │ │ │ │ ├── flags: ∅ │ │ │ │ ├── receiver: │ │ │ │ │ @ IntegerNode (location: (1,8)-(1,9)) │ │ │ │ │ └── flags: decimal @@ -34,13 +36,12 @@ │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: │ │ │ │ │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11)) - │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ └── flags: ∅ + │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ └── arguments: (length: 1) + │ │ │ │ │ └── @ IntegerNode (location: (1,10)-(1,11)) + │ │ │ │ │ └── flags: decimal │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: ∅ + │ │ │ │ └── block: ∅ │ │ │ └── closing_loc: (1,11)-(1,12) = "}" │ │ └── closing_loc: ∅ │ └── @ SymbolNode (location: (1,13)-(1,14)) @@ -49,5 +50,4 @@ │ ├── closing_loc: ∅ │ └── unescaped: "c" ├── opening_loc: (1,0)-(1,3) = "%I(" - ├── closing_loc: (1,14)-(1,15) = ")" - └── flags: ∅ + └── closing_loc: (1,14)-(1,15) = ")" diff --git a/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt index cdaf54b6c8..9727fac0a0 100644 --- a/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt +++ b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,12)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,12)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :puts @@ -11,23 +12,22 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,12)) - │ ├── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,5)-(1,12)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,5)-(1,12)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,5)-(1,9)) - │ │ │ ├── opening_loc: (1,5)-(1,6) = "'" - │ │ │ ├── value_loc: (1,6)-(1,7) = "a" - │ │ │ ├── closing_loc: (1,7)-(1,9) = "':" - │ │ │ └── unescaped: "a" - │ │ ├── value: - │ │ │ @ HashNode (location: (1,10)-(1,12)) - │ │ │ ├── opening_loc: (1,10)-(1,11) = "{" - │ │ │ ├── elements: (length: 0) - │ │ │ └── closing_loc: (1,11)-(1,12) = "}" - │ │ └── operator_loc: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (1,5)-(1,12)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,5)-(1,12)) + │ ├── key: + │ │ @ SymbolNode (location: (1,5)-(1,9)) + │ │ ├── opening_loc: (1,5)-(1,6) = "'" + │ │ ├── value_loc: (1,6)-(1,7) = "a" + │ │ ├── closing_loc: (1,7)-(1,9) = "':" + │ │ └── unescaped: "a" + │ ├── value: + │ │ @ HashNode (location: (1,10)-(1,12)) + │ │ ├── opening_loc: (1,10)-(1,11) = "{" + │ │ ├── elements: (length: 0) + │ │ └── closing_loc: (1,11)-(1,12) = "}" + │ └── operator_loc: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/qwords_empty.txt b/test/prism/snapshots/seattlerb/qwords_empty.txt index 4f50f52cbb..f9915c97c9 100644 --- a/test/prism/snapshots/seattlerb/qwords_empty.txt +++ b/test/prism/snapshots/seattlerb/qwords_empty.txt @@ -4,7 +4,7 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,4)) + ├── flags: ∅ ├── elements: (length: 0) ├── opening_loc: (1,0)-(1,3) = "%w(" - ├── closing_loc: (1,3)-(1,4) = ")" - └── flags: ∅ + └── closing_loc: (1,3)-(1,4) = ")" diff --git a/test/prism/snapshots/seattlerb/regexp.txt b/test/prism/snapshots/seattlerb/regexp.txt index fead46a8be..abe17918e5 100644 --- a/test/prism/snapshots/seattlerb/regexp.txt +++ b/test/prism/snapshots/seattlerb/regexp.txt @@ -4,32 +4,32 @@ @ StatementsNode (location: (1,0)-(9,13)) └── body: (length: 5) ├── @ RegularExpressionNode (location: (1,0)-(1,5)) + │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,1) = "/" │ ├── content_loc: (1,1)-(1,4) = "wtf" │ ├── closing_loc: (1,4)-(1,5) = "/" - │ ├── unescaped: "wtf" - │ └── flags: ∅ + │ └── unescaped: "wtf" ├── @ RegularExpressionNode (location: (3,0)-(3,6)) + │ ├── flags: multi_line │ ├── opening_loc: (3,0)-(3,1) = "/" │ ├── content_loc: (3,1)-(3,4) = "wtf" │ ├── closing_loc: (3,4)-(3,6) = "/m" - │ ├── unescaped: "wtf" - │ └── flags: multi_line + │ └── unescaped: "wtf" ├── @ RegularExpressionNode (location: (5,0)-(5,6)) + │ ├── flags: ascii_8bit │ ├── opening_loc: (5,0)-(5,1) = "/" │ ├── content_loc: (5,1)-(5,4) = "wtf" │ ├── closing_loc: (5,4)-(5,6) = "/n" - │ ├── unescaped: "wtf" - │ └── flags: ascii_8bit + │ └── unescaped: "wtf" ├── @ RegularExpressionNode (location: (7,0)-(7,7)) + │ ├── flags: multi_line, ascii_8bit │ ├── opening_loc: (7,0)-(7,1) = "/" │ ├── content_loc: (7,1)-(7,4) = "wtf" │ ├── closing_loc: (7,4)-(7,7) = "/nm" - │ ├── unescaped: "wtf" - │ └── flags: multi_line, ascii_8bit + │ └── unescaped: "wtf" └── @ RegularExpressionNode (location: (9,0)-(9,13)) + ├── flags: multi_line, ascii_8bit ├── opening_loc: (9,0)-(9,1) = "/" ├── content_loc: (9,1)-(9,4) = "wtf" ├── closing_loc: (9,4)-(9,13) = "/nmnmnmnm" - ├── unescaped: "wtf" - └── flags: multi_line, ascii_8bit + └── unescaped: "wtf" diff --git a/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt b/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt index caf67b892d..b6bf242612 100644 --- a/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt +++ b/test/prism/snapshots/seattlerb/regexp_esc_C_slash.txt @@ -4,8 +4,8 @@ @ StatementsNode (location: (1,0)-(1,7)) └── body: (length: 1) └── @ RegularExpressionNode (location: (1,0)-(1,7)) + ├── flags: ∅ ├── opening_loc: (1,0)-(1,1) = "/" ├── content_loc: (1,1)-(1,6) = "\\cC\\d" ├── closing_loc: (1,6)-(1,7) = "/" - ├── unescaped: "\\x03\\d" - └── flags: ∅ + └── unescaped: "\\x03\\d" diff --git a/test/prism/snapshots/seattlerb/regexp_esc_u.txt b/test/prism/snapshots/seattlerb/regexp_esc_u.txt index ea6bbb6141..7b1ebdc636 100644 --- a/test/prism/snapshots/seattlerb/regexp_esc_u.txt +++ b/test/prism/snapshots/seattlerb/regexp_esc_u.txt @@ -4,8 +4,8 @@ @ StatementsNode (location: (1,0)-(1,17)) └── body: (length: 1) └── @ RegularExpressionNode (location: (1,0)-(1,17)) + ├── flags: ∅ ├── opening_loc: (1,0)-(1,1) = "/" ├── content_loc: (1,1)-(1,16) = "[\\u0021-\\u0027]" ├── closing_loc: (1,16)-(1,17) = "/" - ├── unescaped: "[\\u0021-\\u0027]" - └── flags: ∅ + └── unescaped: "[\\u0021-\\u0027]" diff --git a/test/prism/snapshots/seattlerb/regexp_escape_extended.txt b/test/prism/snapshots/seattlerb/regexp_escape_extended.txt index a8fb9a56f0..6568d2bd92 100644 --- a/test/prism/snapshots/seattlerb/regexp_escape_extended.txt +++ b/test/prism/snapshots/seattlerb/regexp_escape_extended.txt @@ -4,8 +4,8 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ RegularExpressionNode (location: (1,0)-(1,6)) + ├── flags: ∅ ├── opening_loc: (1,0)-(1,1) = "/" ├── content_loc: (1,1)-(1,5) = "\\“" ├── closing_loc: (1,5)-(1,6) = "/" - ├── unescaped: "“" - └── flags: ∅ + └── unescaped: "“" diff --git a/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt b/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt index 74e8b52787..8dd265af5f 100644 --- a/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt +++ b/test/prism/snapshots/seattlerb/regexp_unicode_curlies.txt @@ -4,14 +4,14 @@ @ StatementsNode (location: (1,0)-(3,8)) └── body: (length: 2) ├── @ RegularExpressionNode (location: (1,0)-(1,15)) + │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,1) = "/" │ ├── content_loc: (1,1)-(1,14) = "\\u{c0de babe}" │ ├── closing_loc: (1,14)-(1,15) = "/" - │ ├── unescaped: "\\u{c0de babe}" - │ └── flags: ∅ + │ └── unescaped: "\\u{c0de babe}" └── @ RegularExpressionNode (location: (3,0)-(3,8)) + ├── flags: ∅ ├── opening_loc: (3,0)-(3,1) = "/" ├── content_loc: (3,1)-(3,7) = "\\u{df}" ├── closing_loc: (3,7)-(3,8) = "/" - ├── unescaped: "\\u{df}" - └── flags: ∅ + └── unescaped: "\\u{df}" diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt index fa67add940..4dd724b36b 100644 --- a/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt +++ b/test/prism/snapshots/seattlerb/rescue_do_end_ensure_result.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(5,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(5,8)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,0)-(5,3)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :proc @@ -13,45 +15,43 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: - │ │ @ BlockNode (location: (1,5)-(5,3)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── parameters: ∅ - │ │ ├── body: - │ │ │ @ BeginNode (location: (2,2)-(5,3)) - │ │ │ ├── begin_keyword_loc: ∅ - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (2,2)-(2,8)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (2,2)-(2,8)) - │ │ │ │ ├── opening_loc: (2,2)-(2,3) = ":" - │ │ │ │ ├── value_loc: (2,3)-(2,8) = "begin" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "begin" - │ │ │ ├── rescue_clause: ∅ - │ │ │ ├── else_clause: ∅ - │ │ │ ├── ensure_clause: - │ │ │ │ @ EnsureNode (location: (3,0)-(5,3)) - │ │ │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure" - │ │ │ │ ├── statements: - │ │ │ │ │ @ StatementsNode (location: (4,2)-(4,9)) - │ │ │ │ │ └── body: (length: 1) - │ │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) - │ │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" - │ │ │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure" - │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ └── unescaped: "ensure" - │ │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" - │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" - │ │ ├── opening_loc: (1,5)-(1,7) = "do" - │ │ └── closing_loc: (5,0)-(5,3) = "end" - │ └── flags: ∅ + │ └── block: + │ @ BlockNode (location: (1,5)-(5,3)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: + │ │ @ BeginNode (location: (2,2)-(5,3)) + │ │ ├── begin_keyword_loc: ∅ + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (2,2)-(2,8)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (2,2)-(2,8)) + │ │ │ ├── opening_loc: (2,2)-(2,3) = ":" + │ │ │ ├── value_loc: (2,3)-(2,8) = "begin" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "begin" + │ │ ├── rescue_clause: ∅ + │ │ ├── else_clause: ∅ + │ │ ├── ensure_clause: + │ │ │ @ EnsureNode (location: (3,0)-(5,3)) + │ │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure" + │ │ │ ├── statements: + │ │ │ │ @ StatementsNode (location: (4,2)-(4,9)) + │ │ │ │ └── body: (length: 1) + │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) + │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" + │ │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "ensure" + │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" + │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" + │ ├── opening_loc: (1,5)-(1,7) = "do" + │ └── closing_loc: (5,0)-(5,3) = "end" ├── call_operator_loc: (5,3)-(5,4) = "." ├── name: :call ├── message_loc: (5,4)-(5,8) = "call" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt index 2f2b21602f..06cff0804b 100644 --- a/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt +++ b/test/prism/snapshots/seattlerb/rescue_do_end_no_raise.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(9,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(9,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :tap @@ -11,62 +12,61 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,4)-(9,3)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ BeginNode (location: (2,2)-(9,3)) - │ │ ├── begin_keyword_loc: ∅ - │ │ ├── statements: - │ │ │ @ StatementsNode (location: (2,2)-(2,8)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ SymbolNode (location: (2,2)-(2,8)) - │ │ │ ├── opening_loc: (2,2)-(2,3) = ":" - │ │ │ ├── value_loc: (2,3)-(2,8) = "begin" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "begin" - │ │ ├── rescue_clause: - │ │ │ @ RescueNode (location: (3,0)-(4,9)) - │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue" - │ │ │ ├── exceptions: (length: 0) - │ │ │ ├── operator_loc: ∅ - │ │ │ ├── reference: ∅ - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (4,2)-(4,9)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) - │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" - │ │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "rescue" - │ │ │ └── consequent: ∅ - │ │ ├── else_clause: - │ │ │ @ ElseNode (location: (5,0)-(7,6)) - │ │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else" - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (6,2)-(6,7)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (6,2)-(6,7)) - │ │ │ │ ├── opening_loc: (6,2)-(6,3) = ":" - │ │ │ │ ├── value_loc: (6,3)-(6,7) = "else" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "else" - │ │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure" - │ │ ├── ensure_clause: - │ │ │ @ EnsureNode (location: (7,0)-(9,3)) - │ │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure" - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (8,2)-(8,9)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (8,2)-(8,9)) - │ │ │ │ ├── opening_loc: (8,2)-(8,3) = ":" - │ │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "ensure" - │ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end" - │ │ └── end_keyword_loc: (9,0)-(9,3) = "end" - │ ├── opening_loc: (1,4)-(1,6) = "do" - │ └── closing_loc: (9,0)-(9,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,4)-(9,3)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ BeginNode (location: (2,2)-(9,3)) + │ ├── begin_keyword_loc: ∅ + │ ├── statements: + │ │ @ StatementsNode (location: (2,2)-(2,8)) + │ │ └── body: (length: 1) + │ │ └── @ SymbolNode (location: (2,2)-(2,8)) + │ │ ├── opening_loc: (2,2)-(2,3) = ":" + │ │ ├── value_loc: (2,3)-(2,8) = "begin" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "begin" + │ ├── rescue_clause: + │ │ @ RescueNode (location: (3,0)-(4,9)) + │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue" + │ │ ├── exceptions: (length: 0) + │ │ ├── operator_loc: ∅ + │ │ ├── reference: ∅ + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (4,2)-(4,9)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) + │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" + │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "rescue" + │ │ └── consequent: ∅ + │ ├── else_clause: + │ │ @ ElseNode (location: (5,0)-(7,6)) + │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else" + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (6,2)-(6,7)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (6,2)-(6,7)) + │ │ │ ├── opening_loc: (6,2)-(6,3) = ":" + │ │ │ ├── value_loc: (6,3)-(6,7) = "else" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "else" + │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure" + │ ├── ensure_clause: + │ │ @ EnsureNode (location: (7,0)-(9,3)) + │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure" + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (8,2)-(8,9)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (8,2)-(8,9)) + │ │ │ ├── opening_loc: (8,2)-(8,3) = ":" + │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "ensure" + │ │ └── end_keyword_loc: (9,0)-(9,3) = "end" + │ └── end_keyword_loc: (9,0)-(9,3) = "end" + ├── opening_loc: (1,4)-(1,6) = "do" + └── closing_loc: (9,0)-(9,3) = "end" diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt index ca565cb6d8..e4eedae9a8 100644 --- a/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt +++ b/test/prism/snapshots/seattlerb/rescue_do_end_raised.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(5,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(5,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :tap @@ -11,42 +12,41 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,4)-(5,3)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ BeginNode (location: (2,2)-(5,3)) - │ │ ├── begin_keyword_loc: ∅ - │ │ ├── statements: - │ │ │ @ StatementsNode (location: (2,2)-(2,7)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (2,2)-(2,7)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :raise - │ │ │ ├── message_loc: (2,2)-(2,7) = "raise" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ ├── rescue_clause: ∅ - │ │ ├── else_clause: ∅ - │ │ ├── ensure_clause: - │ │ │ @ EnsureNode (location: (3,0)-(5,3)) - │ │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure" - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (4,2)-(4,9)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) - │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" - │ │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "ensure" - │ │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" - │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" - │ ├── opening_loc: (1,4)-(1,6) = "do" - │ └── closing_loc: (5,0)-(5,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,4)-(5,3)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ BeginNode (location: (2,2)-(5,3)) + │ ├── begin_keyword_loc: ∅ + │ ├── statements: + │ │ @ StatementsNode (location: (2,2)-(2,7)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (2,2)-(2,7)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :raise + │ │ ├── message_loc: (2,2)-(2,7) = "raise" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── rescue_clause: ∅ + │ ├── else_clause: ∅ + │ ├── ensure_clause: + │ │ @ EnsureNode (location: (3,0)-(5,3)) + │ │ ├── ensure_keyword_loc: (3,0)-(3,6) = "ensure" + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (4,2)-(4,9)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) + │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" + │ │ │ ├── value_loc: (4,3)-(4,9) = "ensure" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "ensure" + │ │ └── end_keyword_loc: (5,0)-(5,3) = "end" + │ └── end_keyword_loc: (5,0)-(5,3) = "end" + ├── opening_loc: (1,4)-(1,6) = "do" + └── closing_loc: (5,0)-(5,3) = "end" diff --git a/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt index 69ae4d1173..8beab662e6 100644 --- a/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt +++ b/test/prism/snapshots/seattlerb/rescue_do_end_rescued.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(9,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(9,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :tap @@ -11,67 +12,66 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,4)-(9,3)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ BeginNode (location: (2,2)-(9,3)) - │ │ ├── begin_keyword_loc: ∅ - │ │ ├── statements: - │ │ │ @ StatementsNode (location: (2,2)-(2,7)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (2,2)-(2,7)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :raise - │ │ │ ├── message_loc: (2,2)-(2,7) = "raise" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ ├── rescue_clause: - │ │ │ @ RescueNode (location: (3,0)-(4,9)) - │ │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue" - │ │ │ ├── exceptions: (length: 0) - │ │ │ ├── operator_loc: ∅ - │ │ │ ├── reference: ∅ - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (4,2)-(4,9)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) - │ │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" - │ │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "rescue" - │ │ │ └── consequent: ∅ - │ │ ├── else_clause: - │ │ │ @ ElseNode (location: (5,0)-(7,6)) - │ │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else" - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (6,2)-(6,7)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (6,2)-(6,7)) - │ │ │ │ ├── opening_loc: (6,2)-(6,3) = ":" - │ │ │ │ ├── value_loc: (6,3)-(6,7) = "else" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "else" - │ │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure" - │ │ ├── ensure_clause: - │ │ │ @ EnsureNode (location: (7,0)-(9,3)) - │ │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure" - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (8,2)-(8,9)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ SymbolNode (location: (8,2)-(8,9)) - │ │ │ │ ├── opening_loc: (8,2)-(8,3) = ":" - │ │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "ensure" - │ │ │ └── end_keyword_loc: (9,0)-(9,3) = "end" - │ │ └── end_keyword_loc: (9,0)-(9,3) = "end" - │ ├── opening_loc: (1,4)-(1,6) = "do" - │ └── closing_loc: (9,0)-(9,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,4)-(9,3)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ BeginNode (location: (2,2)-(9,3)) + │ ├── begin_keyword_loc: ∅ + │ ├── statements: + │ │ @ StatementsNode (location: (2,2)-(2,7)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (2,2)-(2,7)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :raise + │ │ ├── message_loc: (2,2)-(2,7) = "raise" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── rescue_clause: + │ │ @ RescueNode (location: (3,0)-(4,9)) + │ │ ├── keyword_loc: (3,0)-(3,6) = "rescue" + │ │ ├── exceptions: (length: 0) + │ │ ├── operator_loc: ∅ + │ │ ├── reference: ∅ + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (4,2)-(4,9)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (4,2)-(4,9)) + │ │ │ ├── opening_loc: (4,2)-(4,3) = ":" + │ │ │ ├── value_loc: (4,3)-(4,9) = "rescue" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "rescue" + │ │ └── consequent: ∅ + │ ├── else_clause: + │ │ @ ElseNode (location: (5,0)-(7,6)) + │ │ ├── else_keyword_loc: (5,0)-(5,4) = "else" + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (6,2)-(6,7)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (6,2)-(6,7)) + │ │ │ ├── opening_loc: (6,2)-(6,3) = ":" + │ │ │ ├── value_loc: (6,3)-(6,7) = "else" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "else" + │ │ └── end_keyword_loc: (7,0)-(7,6) = "ensure" + │ ├── ensure_clause: + │ │ @ EnsureNode (location: (7,0)-(9,3)) + │ │ ├── ensure_keyword_loc: (7,0)-(7,6) = "ensure" + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (8,2)-(8,9)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ SymbolNode (location: (8,2)-(8,9)) + │ │ │ ├── opening_loc: (8,2)-(8,3) = ":" + │ │ │ ├── value_loc: (8,3)-(8,9) = "ensure" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "ensure" + │ │ └── end_keyword_loc: (9,0)-(9,3) = "end" + │ └── end_keyword_loc: (9,0)-(9,3) = "end" + ├── opening_loc: (1,4)-(1,6) = "do" + └── closing_loc: (9,0)-(9,3) = "end" diff --git a/test/prism/snapshots/seattlerb/rescue_in_block.txt b/test/prism/snapshots/seattlerb/rescue_in_block.txt index 7598ad6d45..10019765e3 100644 --- a/test/prism/snapshots/seattlerb/rescue_in_block.txt +++ b/test/prism/snapshots/seattlerb/rescue_in_block.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(4,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :blah @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: - │ @ BlockNode (location: (1,5)-(4,3)) - │ ├── locals: [] - │ ├── locals_body_index: 0 - │ ├── parameters: ∅ - │ ├── body: - │ │ @ BeginNode (location: (2,0)-(4,3)) - │ │ ├── begin_keyword_loc: ∅ - │ │ ├── statements: ∅ - │ │ ├── rescue_clause: - │ │ │ @ RescueNode (location: (2,0)-(3,7)) - │ │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue" - │ │ │ ├── exceptions: (length: 0) - │ │ │ ├── operator_loc: ∅ - │ │ │ ├── reference: ∅ - │ │ │ ├── statements: - │ │ │ │ @ StatementsNode (location: (3,2)-(3,7)) - │ │ │ │ └── body: (length: 1) - │ │ │ │ └── @ CallNode (location: (3,2)-(3,7)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :stuff - │ │ │ │ ├── message_loc: (3,2)-(3,7) = "stuff" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ └── consequent: ∅ - │ │ ├── else_clause: ∅ - │ │ ├── ensure_clause: ∅ - │ │ └── end_keyword_loc: (4,0)-(4,3) = "end" - │ ├── opening_loc: (1,5)-(1,7) = "do" - │ └── closing_loc: (4,0)-(4,3) = "end" - └── flags: ∅ + └── block: + @ BlockNode (location: (1,5)-(4,3)) + ├── locals: [] + ├── locals_body_index: 0 + ├── parameters: ∅ + ├── body: + │ @ BeginNode (location: (2,0)-(4,3)) + │ ├── begin_keyword_loc: ∅ + │ ├── statements: ∅ + │ ├── rescue_clause: + │ │ @ RescueNode (location: (2,0)-(3,7)) + │ │ ├── keyword_loc: (2,0)-(2,6) = "rescue" + │ │ ├── exceptions: (length: 0) + │ │ ├── operator_loc: ∅ + │ │ ├── reference: ∅ + │ │ ├── statements: + │ │ │ @ StatementsNode (location: (3,2)-(3,7)) + │ │ │ └── body: (length: 1) + │ │ │ └── @ CallNode (location: (3,2)-(3,7)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :stuff + │ │ │ ├── message_loc: (3,2)-(3,7) = "stuff" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ └── consequent: ∅ + │ ├── else_clause: ∅ + │ ├── ensure_clause: ∅ + │ └── end_keyword_loc: (4,0)-(4,3) = "end" + ├── opening_loc: (1,5)-(1,7) = "do" + └── closing_loc: (4,0)-(4,3) = "end" diff --git a/test/prism/snapshots/seattlerb/rescue_parens.txt b/test/prism/snapshots/seattlerb/rescue_parens.txt index 300627ac80..0471b8b36a 100644 --- a/test/prism/snapshots/seattlerb/rescue_parens.txt +++ b/test/prism/snapshots/seattlerb/rescue_parens.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,14)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,14)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :a @@ -11,38 +12,37 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,14)) - │ ├── arguments: (length: 1) - │ │ └── @ ParenthesesNode (location: (1,2)-(1,14)) - │ │ ├── body: - │ │ │ @ StatementsNode (location: (1,3)-(1,13)) - │ │ │ └── body: (length: 1) - │ │ │ └── @ RescueModifierNode (location: (1,3)-(1,13)) - │ │ │ ├── expression: - │ │ │ │ @ CallNode (location: (1,3)-(1,4)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :b - │ │ │ │ ├── message_loc: (1,3)-(1,4) = "b" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── keyword_loc: (1,5)-(1,11) = "rescue" - │ │ │ └── rescue_expression: - │ │ │ @ CallNode (location: (1,12)-(1,13)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :c - │ │ │ ├── message_loc: (1,12)-(1,13) = "c" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ ├── opening_loc: (1,2)-(1,3) = "(" - │ │ └── closing_loc: (1,13)-(1,14) = ")" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ ParenthesesNode (location: (1,2)-(1,14)) + │ ├── body: + │ │ @ StatementsNode (location: (1,3)-(1,13)) + │ │ └── body: (length: 1) + │ │ └── @ RescueModifierNode (location: (1,3)-(1,13)) + │ │ ├── expression: + │ │ │ @ CallNode (location: (1,3)-(1,4)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :b + │ │ │ ├── message_loc: (1,3)-(1,4) = "b" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── keyword_loc: (1,5)-(1,11) = "rescue" + │ │ └── rescue_expression: + │ │ @ CallNode (location: (1,12)-(1,13)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :c + │ │ ├── message_loc: (1,12)-(1,13) = "c" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── opening_loc: (1,2)-(1,3) = "(" + │ └── closing_loc: (1,13)-(1,14) = ")" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/return_call_assocs.txt b/test/prism/snapshots/seattlerb/return_call_assocs.txt index d67290ffb8..64ab636ffc 100644 --- a/test/prism/snapshots/seattlerb/return_call_assocs.txt +++ b/test/prism/snapshots/seattlerb/return_call_assocs.txt @@ -7,185 +7,185 @@ │ ├── keyword_loc: (1,0)-(1,6) = "return" │ └── arguments: │ @ ArgumentsNode (location: (1,7)-(1,17)) - │ ├── arguments: (length: 2) - │ │ ├── @ IntegerNode (location: (1,7)-(1,8)) - │ │ │ └── flags: decimal - │ │ └── @ KeywordHashNode (location: (1,10)-(1,17)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,10)-(1,17)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,10)-(1,12)) - │ │ │ ├── opening_loc: (1,10)-(1,11) = ":" - │ │ │ ├── value_loc: (1,11)-(1,12) = "z" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "z" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,16)-(1,17)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,13)-(1,15) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ IntegerNode (location: (1,7)-(1,8)) + │ │ └── flags: decimal + │ └── @ KeywordHashNode (location: (1,10)-(1,17)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (1,10)-(1,17)) + │ ├── key: + │ │ @ SymbolNode (location: (1,10)-(1,12)) + │ │ ├── opening_loc: (1,10)-(1,11) = ":" + │ │ ├── value_loc: (1,11)-(1,12) = "z" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "z" + │ ├── value: + │ │ @ IntegerNode (location: (1,16)-(1,17)) + │ │ └── flags: decimal + │ └── operator_loc: (1,13)-(1,15) = "=>" ├── @ ReturnNode (location: (3,0)-(3,26)) │ ├── keyword_loc: (3,0)-(3,6) = "return" │ └── arguments: │ @ ArgumentsNode (location: (3,7)-(3,26)) - │ ├── arguments: (length: 2) - │ │ ├── @ IntegerNode (location: (3,7)-(3,8)) - │ │ │ └── flags: decimal - │ │ └── @ KeywordHashNode (location: (3,10)-(3,26)) - │ │ └── elements: (length: 2) - │ │ ├── @ AssocNode (location: (3,10)-(3,17)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (3,10)-(3,12)) - │ │ │ │ ├── opening_loc: (3,10)-(3,11) = ":" - │ │ │ │ ├── value_loc: (3,11)-(3,12) = "z" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "z" - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (3,16)-(3,17)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: (3,13)-(3,15) = "=>" - │ │ └── @ AssocNode (location: (3,19)-(3,26)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (3,19)-(3,21)) - │ │ │ ├── opening_loc: (3,19)-(3,20) = ":" - │ │ │ ├── value_loc: (3,20)-(3,21) = "w" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "w" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (3,25)-(3,26)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (3,22)-(3,24) = "=>" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 2) + │ ├── @ IntegerNode (location: (3,7)-(3,8)) + │ │ └── flags: decimal + │ └── @ KeywordHashNode (location: (3,10)-(3,26)) + │ └── elements: (length: 2) + │ ├── @ AssocNode (location: (3,10)-(3,17)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (3,10)-(3,12)) + │ │ │ ├── opening_loc: (3,10)-(3,11) = ":" + │ │ │ ├── value_loc: (3,11)-(3,12) = "z" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "z" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (3,16)-(3,17)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: (3,13)-(3,15) = "=>" + │ └── @ AssocNode (location: (3,19)-(3,26)) + │ ├── key: + │ │ @ SymbolNode (location: (3,19)-(3,21)) + │ │ ├── opening_loc: (3,19)-(3,20) = ":" + │ │ ├── value_loc: (3,20)-(3,21) = "w" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "w" + │ ├── value: + │ │ @ IntegerNode (location: (3,25)-(3,26)) + │ │ └── flags: decimal + │ └── operator_loc: (3,22)-(3,24) = "=>" ├── @ ReturnNode (location: (5,0)-(5,14)) │ ├── keyword_loc: (5,0)-(5,6) = "return" │ └── arguments: │ @ ArgumentsNode (location: (5,7)-(5,14)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (5,7)-(5,14)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :y - │ │ ├── message_loc: (5,7)-(5,8) = "y" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (5,9)-(5,14)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ KeywordHashNode (location: (5,9)-(5,14)) - │ │ │ │ └── elements: (length: 1) - │ │ │ │ └── @ AssocNode (location: (5,9)-(5,14)) - │ │ │ │ ├── key: - │ │ │ │ │ @ SymbolNode (location: (5,9)-(5,11)) - │ │ │ │ │ ├── opening_loc: (5,9)-(5,10) = ":" - │ │ │ │ │ ├── value_loc: (5,10)-(5,11) = "z" - │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ └── unescaped: "z" - │ │ │ │ ├── value: - │ │ │ │ │ @ IntegerNode (location: (5,13)-(5,14)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── operator_loc: (5,11)-(5,13) = "=>" - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (5,7)-(5,14)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :y + │ ├── message_loc: (5,7)-(5,8) = "y" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (5,9)-(5,14)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (5,9)-(5,14)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (5,9)-(5,14)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (5,9)-(5,11)) + │ │ │ ├── opening_loc: (5,9)-(5,10) = ":" + │ │ │ ├── value_loc: (5,10)-(5,11) = "z" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "z" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (5,13)-(5,14)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: (5,11)-(5,13) = "=>" + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── @ ReturnNode (location: (7,0)-(7,12)) │ ├── keyword_loc: (7,0)-(7,6) = "return" │ └── arguments: │ @ ArgumentsNode (location: (7,7)-(7,12)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (7,7)-(7,12)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :y - │ │ ├── message_loc: (7,7)-(7,8) = "y" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (7,9)-(7,12)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ KeywordHashNode (location: (7,9)-(7,12)) - │ │ │ │ └── elements: (length: 1) - │ │ │ │ └── @ AssocNode (location: (7,9)-(7,12)) - │ │ │ │ ├── key: - │ │ │ │ │ @ SymbolNode (location: (7,9)-(7,11)) - │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── value_loc: (7,9)-(7,10) = "z" - │ │ │ │ │ ├── closing_loc: (7,10)-(7,11) = ":" - │ │ │ │ │ └── unescaped: "z" - │ │ │ │ ├── value: - │ │ │ │ │ @ IntegerNode (location: (7,11)-(7,12)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── operator_loc: ∅ - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (7,7)-(7,12)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :y + │ ├── message_loc: (7,7)-(7,8) = "y" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (7,9)-(7,12)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (7,9)-(7,12)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (7,9)-(7,12)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (7,9)-(7,11)) + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── value_loc: (7,9)-(7,10) = "z" + │ │ │ ├── closing_loc: (7,10)-(7,11) = ":" + │ │ │ └── unescaped: "z" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (7,11)-(7,12)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── @ ReturnNode (location: (9,0)-(9,13)) │ ├── keyword_loc: (9,0)-(9,6) = "return" │ └── arguments: │ @ ArgumentsNode (location: (9,7)-(9,13)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (9,7)-(9,13)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :y - │ │ ├── message_loc: (9,7)-(9,8) = "y" - │ │ ├── opening_loc: (9,8)-(9,9) = "(" - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (9,9)-(9,12)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ KeywordHashNode (location: (9,9)-(9,12)) - │ │ │ │ └── elements: (length: 1) - │ │ │ │ └── @ AssocNode (location: (9,9)-(9,12)) - │ │ │ │ ├── key: - │ │ │ │ │ @ SymbolNode (location: (9,9)-(9,11)) - │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── value_loc: (9,9)-(9,10) = "z" - │ │ │ │ │ ├── closing_loc: (9,10)-(9,11) = ":" - │ │ │ │ │ └── unescaped: "z" - │ │ │ │ ├── value: - │ │ │ │ │ @ IntegerNode (location: (9,11)-(9,12)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── operator_loc: ∅ - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: (9,12)-(9,13) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (9,7)-(9,13)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :y + │ ├── message_loc: (9,7)-(9,8) = "y" + │ ├── opening_loc: (9,8)-(9,9) = "(" + │ ├── arguments: + │ │ @ ArgumentsNode (location: (9,9)-(9,12)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (9,9)-(9,12)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (9,9)-(9,12)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (9,9)-(9,11)) + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── value_loc: (9,9)-(9,10) = "z" + │ │ │ ├── closing_loc: (9,10)-(9,11) = ":" + │ │ │ └── unescaped: "z" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (9,11)-(9,12)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: ∅ + │ ├── closing_loc: (9,12)-(9,13) = ")" + │ └── block: ∅ └── @ ReturnNode (location: (11,0)-(11,14)) ├── keyword_loc: (11,0)-(11,6) = "return" └── arguments: @ ArgumentsNode (location: (11,7)-(11,14)) - ├── arguments: (length: 1) - │ └── @ CallNode (location: (11,7)-(11,14)) - │ ├── receiver: ∅ - │ ├── call_operator_loc: ∅ - │ ├── name: :y - │ ├── message_loc: (11,7)-(11,8) = "y" - │ ├── opening_loc: (11,8)-(11,9) = "(" - │ ├── arguments: - │ │ @ ArgumentsNode (location: (11,9)-(11,13)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ KeywordHashNode (location: (11,9)-(11,13)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocNode (location: (11,9)-(11,13)) - │ │ │ ├── key: - │ │ │ │ @ CallNode (location: (11,9)-(11,10)) - │ │ │ │ ├── receiver: ∅ - │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── name: :z - │ │ │ │ ├── message_loc: (11,9)-(11,10) = "z" - │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── arguments: ∅ - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (11,12)-(11,13)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: (11,10)-(11,12) = "=>" - │ │ └── flags: ∅ - │ ├── closing_loc: (11,13)-(11,14) = ")" - │ ├── block: ∅ - │ └── flags: ∅ - └── flags: ∅ + ├── flags: ∅ + └── arguments: (length: 1) + └── @ CallNode (location: (11,7)-(11,14)) + ├── flags: ∅ + ├── receiver: ∅ + ├── call_operator_loc: ∅ + ├── name: :y + ├── message_loc: (11,7)-(11,8) = "y" + ├── opening_loc: (11,8)-(11,9) = "(" + ├── arguments: + │ @ ArgumentsNode (location: (11,9)-(11,13)) + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ KeywordHashNode (location: (11,9)-(11,13)) + │ └── elements: (length: 1) + │ └── @ AssocNode (location: (11,9)-(11,13)) + │ ├── key: + │ │ @ CallNode (location: (11,9)-(11,10)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :z + │ │ ├── message_loc: (11,9)-(11,10) = "z" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── value: + │ │ @ IntegerNode (location: (11,12)-(11,13)) + │ │ └── flags: decimal + │ └── operator_loc: (11,10)-(11,12) = "=>" + ├── closing_loc: (11,13)-(11,14) = ")" + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/ruby21_numbers.txt b/test/prism/snapshots/seattlerb/ruby21_numbers.txt index 3d1d1f0dd2..e1ad6b924c 100644 --- a/test/prism/snapshots/seattlerb/ruby21_numbers.txt +++ b/test/prism/snapshots/seattlerb/ruby21_numbers.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── elements: (length: 3) │ ├── @ ImaginaryNode (location: (1,1)-(1,3)) │ │ └── numeric: @@ -20,5 +21,4 @@ │ @ IntegerNode (location: (1,9)-(1,10)) │ └── flags: decimal ├── opening_loc: (1,0)-(1,1) = "[" - ├── closing_loc: (1,12)-(1,13) = "]" - └── flags: ∅ + └── closing_loc: (1,12)-(1,13) = "]" diff --git a/test/prism/snapshots/seattlerb/safe_attrasgn.txt b/test/prism/snapshots/seattlerb/safe_attrasgn.txt index d7d36c5d7f..b29fef3feb 100644 --- a/test/prism/snapshots/seattlerb/safe_attrasgn.txt +++ b/test/prism/snapshots/seattlerb/safe_attrasgn.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,8)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,18 +15,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── name: :b= ├── message_loc: (1,3)-(1,4) = "b" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,7)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,7)-(1,8)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,7)-(1,8)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt b/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt index c299e95929..39fb489e5e 100644 --- a/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt +++ b/test/prism/snapshots/seattlerb/safe_attrasgn_constant.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,8)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,18 +15,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── name: :B= ├── message_loc: (1,3)-(1,4) = "B" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,7)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,7)-(1,8)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,7)-(1,8)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_call.txt b/test/prism/snapshots/seattlerb/safe_call.txt index 108c6ca820..a6ba52bede 100644 --- a/test/prism/snapshots/seattlerb/safe_call.txt +++ b/test/prism/snapshots/seattlerb/safe_call.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,4)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── name: :b ├── message_loc: (1,3)-(1,4) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_call_after_newline.txt b/test/prism/snapshots/seattlerb/safe_call_after_newline.txt index cee2dacb26..e9adf068c7 100644 --- a/test/prism/snapshots/seattlerb/safe_call_after_newline.txt +++ b/test/prism/snapshots/seattlerb/safe_call_after_newline.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(2,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(2,3)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (2,0)-(2,2) = "&." ├── name: :b ├── message_loc: (2,2)-(2,3) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt b/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt index 1c8eade099..e46db2b102 100644 --- a/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt +++ b/test/prism/snapshots/seattlerb/safe_call_dot_parens.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── name: :call ├── message_loc: ∅ ├── opening_loc: (1,3)-(1,4) = "(" ├── arguments: ∅ ├── closing_loc: (1,4)-(1,5) = ")" - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_call_newline.txt b/test/prism/snapshots/seattlerb/safe_call_newline.txt index 108c6ca820..a6ba52bede 100644 --- a/test/prism/snapshots/seattlerb/safe_call_newline.txt +++ b/test/prism/snapshots/seattlerb/safe_call_newline.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,4)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── name: :b ├── message_loc: (1,3)-(1,4) = "b" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_call_operator.txt b/test/prism/snapshots/seattlerb/safe_call_operator.txt index ed8a790add..f6027afefb 100644 --- a/test/prism/snapshots/seattlerb/safe_call_operator.txt +++ b/test/prism/snapshots/seattlerb/safe_call_operator.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,6)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,6)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,18 +15,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── name: :> ├── message_loc: (1,3)-(1,4) = ">" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,5)-(1,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,5)-(1,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,5)-(1,6)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt b/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt index 41c17c6ef3..9acf398819 100644 --- a/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt +++ b/test/prism/snapshots/seattlerb/safe_call_rhs_newline.txt @@ -9,8 +9,10 @@ ├── name_loc: (1,0)-(1,1) = "c" ├── value: │ @ CallNode (location: (1,4)-(1,8)) + │ ├── flags: safe_navigation │ ├── receiver: │ │ @ CallNode (location: (1,4)-(1,5)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -18,14 +20,12 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,5)-(1,7) = "&." │ ├── name: :b │ ├── message_loc: (1,7)-(1,8) = "b" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: safe_navigation + │ └── block: ∅ └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/safe_calls.txt b/test/prism/snapshots/seattlerb/safe_calls.txt index 66d155db84..76931bd4fe 100644 --- a/test/prism/snapshots/seattlerb/safe_calls.txt +++ b/test/prism/snapshots/seattlerb/safe_calls.txt @@ -4,10 +4,13 @@ @ StatementsNode (location: (1,0)-(1,10)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,10)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,4)) + │ ├── flags: safe_navigation │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :a @@ -15,26 +18,23 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,1)-(1,3) = "&." │ ├── name: :b │ ├── message_loc: (1,3)-(1,4) = "b" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: safe_navigation + │ └── block: ∅ ├── call_operator_loc: (1,4)-(1,6) = "&." ├── name: :c ├── message_loc: (1,6)-(1,7) = "c" ├── opening_loc: (1,7)-(1,8) = "(" ├── arguments: │ @ ArgumentsNode (location: (1,8)-(1,9)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,8)-(1,9)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,8)-(1,9)) + │ └── flags: decimal ├── closing_loc: (1,9)-(1,10) = ")" - ├── block: ∅ - └── flags: safe_navigation + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_op_asgn.txt b/test/prism/snapshots/seattlerb/safe_op_asgn.txt index 46cc542dfc..01b783642f 100644 --- a/test/prism/snapshots/seattlerb/safe_op_asgn.txt +++ b/test/prism/snapshots/seattlerb/safe_op_asgn.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,11)) └── body: (length: 1) └── @ CallOperatorWriteNode (location: (1,0)-(1,11)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,17 +15,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── message_loc: (1,3)-(1,4) = "b" - ├── flags: safe_navigation ├── read_name: :b ├── write_name: :b= ├── operator: :+ ├── operator_loc: (1,5)-(1,7) = "+=" └── value: @ CallNode (location: (1,8)-(1,11)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -31,10 +32,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,10)-(1,11)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,10)-(1,11)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,10)-(1,11)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/safe_op_asgn2.txt b/test/prism/snapshots/seattlerb/safe_op_asgn2.txt index 238153f9fb..9d350e53a1 100644 --- a/test/prism/snapshots/seattlerb/safe_op_asgn2.txt +++ b/test/prism/snapshots/seattlerb/safe_op_asgn2.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(2,1)) └── body: (length: 1) └── @ CallOrWriteNode (location: (1,0)-(2,1)) + ├── flags: safe_navigation ├── receiver: │ @ CallNode (location: (1,0)-(1,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,16 +15,15 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (1,1)-(1,3) = "&." ├── message_loc: (1,3)-(1,4) = "b" - ├── flags: safe_navigation ├── read_name: :b ├── write_name: :b= ├── operator_loc: (1,5)-(1,8) = "||=" └── value: @ CallNode (location: (2,0)-(2,1)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -30,5 +31,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt b/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt index a8486b25c0..840b67ab1a 100644 --- a/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt +++ b/test/prism/snapshots/seattlerb/slashy_newlines_within_string.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(6,5)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(4,8)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :puts @@ -11,20 +12,21 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,5)-(4,8)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ StringNode (location: (1,5)-(4,8)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,5)-(1,6) = "\"" - │ │ │ ├── content_loc: (1,6)-(4,7) = "hello\\\n my\\\n dear\\\n friend" - │ │ │ ├── closing_loc: (4,7)-(4,8) = "\"" - │ │ │ └── unescaped: "hello my dear friend" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (1,5)-(4,8)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,5)-(1,6) = "\"" + │ │ ├── content_loc: (1,6)-(4,7) = "hello\\\n my\\\n dear\\\n friend" + │ │ ├── closing_loc: (4,7)-(4,8) = "\"" + │ │ └── unescaped: "hello my dear friend" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (6,0)-(6,5)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (6,0)-(6,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -32,26 +34,24 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :+ ├── message_loc: (6,2)-(6,3) = "+" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (6,4)-(6,5)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (6,4)-(6,5)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :b - │ │ ├── message_loc: (6,4)-(6,5) = "b" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (6,4)-(6,5)) + │ ├── flags: variable_call + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :b + │ ├── message_loc: (6,4)-(6,5) = "b" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt index f1c9237e32..0115ceb46a 100644 --- a/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt +++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(4,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -11,50 +12,49 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(4,3)) - │ ├── arguments: (length: 1) - │ │ └── @ LambdaNode (location: (1,2)-(4,3)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── operator_loc: (1,2)-(1,4) = "->" - │ │ ├── opening_loc: (1,8)-(1,10) = "do" - │ │ ├── closing_loc: (4,0)-(4,3) = "end" - │ │ ├── parameters: - │ │ │ @ BlockParametersNode (location: (1,5)-(1,7)) - │ │ │ ├── parameters: ∅ - │ │ │ ├── locals: (length: 0) - │ │ │ ├── opening_loc: (1,5)-(1,6) = "(" - │ │ │ └── closing_loc: (1,6)-(1,7) = ")" - │ │ └── body: - │ │ @ StatementsNode (location: (2,0)-(3,3)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (2,0)-(3,3)) - │ │ ├── receiver: - │ │ │ @ CallNode (location: (2,0)-(2,1)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :a - │ │ │ ├── message_loc: (2,0)-(2,1) = "a" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call - │ │ ├── call_operator_loc: (2,1)-(2,2) = "." - │ │ ├── name: :b - │ │ ├── message_loc: (2,2)-(2,3) = "b" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: - │ │ │ @ BlockNode (location: (2,4)-(3,3)) - │ │ │ ├── locals: [] - │ │ │ ├── locals_body_index: 0 - │ │ │ ├── parameters: ∅ - │ │ │ ├── body: ∅ - │ │ │ ├── opening_loc: (2,4)-(2,6) = "do" - │ │ │ └── closing_loc: (3,0)-(3,3) = "end" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LambdaNode (location: (1,2)-(4,3)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── operator_loc: (1,2)-(1,4) = "->" + │ ├── opening_loc: (1,8)-(1,10) = "do" + │ ├── closing_loc: (4,0)-(4,3) = "end" + │ ├── parameters: + │ │ @ BlockParametersNode (location: (1,5)-(1,7)) + │ │ ├── parameters: ∅ + │ │ ├── locals: (length: 0) + │ │ ├── opening_loc: (1,5)-(1,6) = "(" + │ │ └── closing_loc: (1,6)-(1,7) = ")" + │ └── body: + │ @ StatementsNode (location: (2,0)-(3,3)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (2,0)-(3,3)) + │ ├── flags: ∅ + │ ├── receiver: + │ │ @ CallNode (location: (2,0)-(2,1)) + │ │ ├── flags: variable_call + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :a + │ │ ├── message_loc: (2,0)-(2,1) = "a" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── call_operator_loc: (2,1)-(2,2) = "." + │ ├── name: :b + │ ├── message_loc: (2,2)-(2,3) = "b" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: + │ @ BlockNode (location: (2,4)-(3,3)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (2,4)-(2,6) = "do" + │ └── closing_loc: (3,0)-(3,3) = "end" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt b/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt index 13062e1c5a..2c680db712 100644 --- a/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt +++ b/test/prism/snapshots/seattlerb/stabby_block_iter_call_no_target_with_arg.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(4,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(4,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -11,45 +12,44 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(4,3)) - │ ├── arguments: (length: 1) - │ │ └── @ LambdaNode (location: (1,2)-(4,3)) - │ │ ├── locals: [] - │ │ ├── locals_body_index: 0 - │ │ ├── operator_loc: (1,2)-(1,4) = "->" - │ │ ├── opening_loc: (1,8)-(1,10) = "do" - │ │ ├── closing_loc: (4,0)-(4,3) = "end" - │ │ ├── parameters: - │ │ │ @ BlockParametersNode (location: (1,5)-(1,7)) - │ │ │ ├── parameters: ∅ - │ │ │ ├── locals: (length: 0) - │ │ │ ├── opening_loc: (1,5)-(1,6) = "(" - │ │ │ └── closing_loc: (1,6)-(1,7) = ")" - │ │ └── body: - │ │ @ StatementsNode (location: (2,0)-(3,3)) - │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (2,0)-(3,3)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :a - │ │ ├── message_loc: (2,0)-(2,1) = "a" - │ │ ├── opening_loc: (2,1)-(2,2) = "(" - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (2,2)-(2,3)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ IntegerNode (location: (2,2)-(2,3)) - │ │ │ │ └── flags: decimal - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: (2,3)-(2,4) = ")" - │ │ ├── block: - │ │ │ @ BlockNode (location: (2,5)-(3,3)) - │ │ │ ├── locals: [] - │ │ │ ├── locals_body_index: 0 - │ │ │ ├── parameters: ∅ - │ │ │ ├── body: ∅ - │ │ │ ├── opening_loc: (2,5)-(2,7) = "do" - │ │ │ └── closing_loc: (3,0)-(3,3) = "end" - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ LambdaNode (location: (1,2)-(4,3)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── operator_loc: (1,2)-(1,4) = "->" + │ ├── opening_loc: (1,8)-(1,10) = "do" + │ ├── closing_loc: (4,0)-(4,3) = "end" + │ ├── parameters: + │ │ @ BlockParametersNode (location: (1,5)-(1,7)) + │ │ ├── parameters: ∅ + │ │ ├── locals: (length: 0) + │ │ ├── opening_loc: (1,5)-(1,6) = "(" + │ │ └── closing_loc: (1,6)-(1,7) = ")" + │ └── body: + │ @ StatementsNode (location: (2,0)-(3,3)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (2,0)-(3,3)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :a + │ ├── message_loc: (2,0)-(2,1) = "a" + │ ├── opening_loc: (2,1)-(2,2) = "(" + │ ├── arguments: + │ │ @ ArgumentsNode (location: (2,2)-(2,3)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (2,2)-(2,3)) + │ │ └── flags: decimal + │ ├── closing_loc: (2,3)-(2,4) = ")" + │ └── block: + │ @ BlockNode (location: (2,5)-(3,3)) + │ ├── locals: [] + │ ├── locals_body_index: 0 + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (2,5)-(2,7) = "do" + │ └── closing_loc: (3,0)-(3,3) = "end" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/str_backslashes.txt b/test/prism/snapshots/seattlerb/str_backslashes.txt index 6cfb89875c..ce5160fd3b 100644 --- a/test/prism/snapshots/seattlerb/str_backslashes.txt +++ b/test/prism/snapshots/seattlerb/str_backslashes.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,204)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,204)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :x @@ -11,14 +12,13 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,2)-(1,204)) - │ ├── arguments: (length: 1) - │ │ └── @ StringNode (location: (1,2)-(1,204)) - │ │ ├── flags: ∅ - │ │ ├── opening_loc: (1,2)-(1,3) = "'" - │ │ ├── content_loc: (1,3)-(1,203) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n" - │ │ ├── closing_loc: (1,203)-(1,204) = "'" - │ │ └── unescaped: "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n" - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ StringNode (location: (1,2)-(1,204)) + │ ├── flags: ∅ + │ ├── opening_loc: (1,2)-(1,3) = "'" + │ ├── content_loc: (1,3)-(1,203) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n" + │ ├── closing_loc: (1,203)-(1,204) = "'" + │ └── unescaped: "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n" ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt index 3e7ae51f77..2edea58cc1 100644 --- a/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt +++ b/test/prism/snapshots/seattlerb/str_double_double_escaped_newline.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,7)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,18 +12,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ StringNode (location: (1,2)-(1,7)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "\"" - │ │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n" - │ │ │ ├── closing_loc: (1,6)-(1,7) = "\"" - │ │ │ └── unescaped: "\\n" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (1,2)-(1,7)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "\"" + │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n" + │ │ ├── closing_loc: (1,6)-(1,7) = "\"" + │ │ └── unescaped: "\\n" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (1,8)-(1,9)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -30,5 +31,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt index 10563703a1..53d356ddaa 100644 --- a/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt +++ b/test/prism/snapshots/seattlerb/str_double_escaped_newline.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,6)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,18 +12,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,6)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ StringNode (location: (1,2)-(1,6)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "\"" - │ │ │ ├── content_loc: (1,3)-(1,5) = "\\n" - │ │ │ ├── closing_loc: (1,5)-(1,6) = "\"" - │ │ │ └── unescaped: "\n" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (1,2)-(1,6)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "\"" + │ │ ├── content_loc: (1,3)-(1,5) = "\\n" + │ │ ├── closing_loc: (1,5)-(1,6) = "\"" + │ │ └── unescaped: "\n" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (1,7)-(1,8)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -30,5 +31,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/str_double_newline.txt b/test/prism/snapshots/seattlerb/str_double_newline.txt index 3c35f62802..b5fd8fb582 100644 --- a/test/prism/snapshots/seattlerb/str_double_newline.txt +++ b/test/prism/snapshots/seattlerb/str_double_newline.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(2,3)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(2,1)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,18 +12,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(2,1)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ StringNode (location: (1,2)-(2,1)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "\"" - │ │ │ ├── content_loc: (1,3)-(2,0) = "\n" - │ │ │ ├── closing_loc: (2,0)-(2,1) = "\"" - │ │ │ └── unescaped: "\n" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (1,2)-(2,1)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "\"" + │ │ ├── content_loc: (1,3)-(2,0) = "\n" + │ │ ├── closing_loc: (2,0)-(2,1) = "\"" + │ │ └── unescaped: "\n" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (2,2)-(2,3)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -30,5 +31,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/str_evstr.txt b/test/prism/snapshots/seattlerb/str_evstr.txt index 7dd048397e..48798a3ddb 100644 --- a/test/prism/snapshots/seattlerb/str_evstr.txt +++ b/test/prism/snapshots/seattlerb/str_evstr.txt @@ -18,6 +18,7 @@ │ │ @ StatementsNode (location: (1,5)-(1,6)) │ │ └── body: (length: 1) │ │ └── @ CallNode (location: (1,5)-(1,6)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -25,7 +26,6 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── closing_loc: (1,6)-(1,7) = "}" └── closing_loc: (1,7)-(1,8) = "\"" diff --git a/test/prism/snapshots/seattlerb/str_evstr_escape.txt b/test/prism/snapshots/seattlerb/str_evstr_escape.txt index a71ab57cf5..f173c0269b 100644 --- a/test/prism/snapshots/seattlerb/str_evstr_escape.txt +++ b/test/prism/snapshots/seattlerb/str_evstr_escape.txt @@ -18,6 +18,7 @@ │ │ │ @ StatementsNode (location: (1,5)-(1,6)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (1,5)-(1,6)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :b @@ -25,8 +26,7 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (1,6)-(1,7) = "}" │ └── @ StringNode (location: (1,7)-(1,15)) │ ├── flags: forced_utf8_encoding diff --git a/test/prism/snapshots/seattlerb/str_heredoc_interp.txt b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt index 03852bfcdd..eab9b874d6 100644 --- a/test/prism/snapshots/seattlerb/str_heredoc_interp.txt +++ b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt @@ -12,6 +12,7 @@ │ │ │ @ StatementsNode (location: (2,2)-(2,3)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (2,2)-(2,3)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :x @@ -19,8 +20,7 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (2,3)-(2,4) = "}" │ └── @ StringNode (location: (2,4)-(4,0)) │ ├── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt b/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt index 5f6d628846..5fadc71333 100644 --- a/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt +++ b/test/prism/snapshots/seattlerb/str_interp_ternary_or_label.txt @@ -15,8 +15,10 @@ │ │ ├── if_keyword_loc: ∅ │ │ ├── predicate: │ │ │ @ CallNode (location: (1,3)-(1,7)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: │ │ │ │ @ CallNode (location: (1,3)-(1,4)) + │ │ │ │ ├── flags: variable_call │ │ │ │ ├── receiver: ∅ │ │ │ │ ├── call_operator_loc: ∅ │ │ │ │ ├── name: :a @@ -24,23 +26,23 @@ │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: ∅ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call + │ │ │ │ └── block: ∅ │ │ │ ├── call_operator_loc: (1,4)-(1,5) = "." │ │ │ ├── name: :b? │ │ │ ├── message_loc: (1,5)-(1,7) = "b?" │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── then_keyword_loc: (1,8)-(1,9) = "?" │ │ ├── statements: │ │ │ @ StatementsNode (location: (1,10)-(1,17)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (1,10)-(1,17)) + │ │ │ ├── flags: ∅ │ │ │ ├── receiver: │ │ │ │ @ CallNode (location: (1,10)-(1,14)) + │ │ │ │ ├── flags: ∅ │ │ │ │ ├── receiver: │ │ │ │ │ @ StringNode (location: (1,10)-(1,12)) │ │ │ │ │ ├── flags: ∅ @@ -54,38 +56,36 @@ │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: │ │ │ │ │ @ ArgumentsNode (location: (1,13)-(1,14)) - │ │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14)) - │ │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ │ ├── name: :a - │ │ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "a" - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ │ └── flags: variable_call - │ │ │ │ │ └── flags: ∅ + │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ └── arguments: (length: 1) + │ │ │ │ │ └── @ CallNode (location: (1,13)-(1,14)) + │ │ │ │ │ ├── flags: variable_call + │ │ │ │ │ ├── receiver: ∅ + │ │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ │ ├── name: :a + │ │ │ │ │ ├── message_loc: (1,13)-(1,14) = "a" + │ │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ │ ├── arguments: ∅ + │ │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ │ └── block: ∅ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: ∅ + │ │ │ │ └── block: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :+ │ │ │ ├── message_loc: (1,14)-(1,15) = "+" │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: │ │ │ │ @ ArgumentsNode (location: (1,15)-(1,17)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ StringNode (location: (1,15)-(1,17)) - │ │ │ │ │ ├── flags: ∅ - │ │ │ │ │ ├── opening_loc: (1,15)-(1,16) = "\"" - │ │ │ │ │ ├── content_loc: (1,16)-(1,16) = "" - │ │ │ │ │ ├── closing_loc: (1,16)-(1,17) = "\"" - │ │ │ │ │ └── unescaped: "" - │ │ │ │ └── flags: ∅ + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ StringNode (location: (1,15)-(1,17)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── opening_loc: (1,15)-(1,16) = "\"" + │ │ │ │ ├── content_loc: (1,16)-(1,16) = "" + │ │ │ │ ├── closing_loc: (1,16)-(1,17) = "\"" + │ │ │ │ └── unescaped: "" │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ + │ │ │ └── block: ∅ │ │ ├── consequent: │ │ │ @ ElseNode (location: (1,17)-(1,21)) │ │ │ ├── else_keyword_loc: (1,17)-(1,18) = ":" diff --git a/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt b/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt index 9aec3ab503..edf51fff7b 100644 --- a/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt +++ b/test/prism/snapshots/seattlerb/str_pct_Q_nested.txt @@ -18,6 +18,7 @@ │ │ │ @ StatementsNode (location: (1,13)-(1,17)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (1,13)-(1,17)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :nest @@ -25,8 +26,7 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (1,17)-(1,18) = "}" │ └── @ StringNode (location: (1,18)-(1,25)) │ ├── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt index a100d78b57..c519951ed0 100644 --- a/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt +++ b/test/prism/snapshots/seattlerb/str_single_double_escaped_newline.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,7)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,18 +12,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,7)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ StringNode (location: (1,2)-(1,7)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "'" - │ │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n" - │ │ │ ├── closing_loc: (1,6)-(1,7) = "'" - │ │ │ └── unescaped: "\\n" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (1,2)-(1,7)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "'" + │ │ ├── content_loc: (1,3)-(1,6) = "\\\\n" + │ │ ├── closing_loc: (1,6)-(1,7) = "'" + │ │ └── unescaped: "\\n" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (1,8)-(1,9)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -30,5 +31,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt b/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt index 5e971dea47..80c4712a74 100644 --- a/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt +++ b/test/prism/snapshots/seattlerb/str_single_escaped_newline.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,8)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,6)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,18 +12,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(1,6)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ StringNode (location: (1,2)-(1,6)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "'" - │ │ │ ├── content_loc: (1,3)-(1,5) = "\\n" - │ │ │ ├── closing_loc: (1,5)-(1,6) = "'" - │ │ │ └── unescaped: "\\n" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (1,2)-(1,6)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "'" + │ │ ├── content_loc: (1,3)-(1,5) = "\\n" + │ │ ├── closing_loc: (1,5)-(1,6) = "'" + │ │ └── unescaped: "\\n" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (1,7)-(1,8)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -30,5 +31,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/str_single_newline.txt b/test/prism/snapshots/seattlerb/str_single_newline.txt index 32e95c6542..d9b8d69f99 100644 --- a/test/prism/snapshots/seattlerb/str_single_newline.txt +++ b/test/prism/snapshots/seattlerb/str_single_newline.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(2,3)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(2,1)) + │ ├── flags: ∅ │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -11,18 +12,18 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,2)-(2,1)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ StringNode (location: (1,2)-(2,1)) - │ │ │ ├── flags: ∅ - │ │ │ ├── opening_loc: (1,2)-(1,3) = "'" - │ │ │ ├── content_loc: (1,3)-(2,0) = "\n" - │ │ │ ├── closing_loc: (2,0)-(2,1) = "'" - │ │ │ └── unescaped: "\n" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ StringNode (location: (1,2)-(2,1)) + │ │ ├── flags: ∅ + │ │ ├── opening_loc: (1,2)-(1,3) = "'" + │ │ ├── content_loc: (1,3)-(2,0) = "\n" + │ │ ├── closing_loc: (2,0)-(2,1) = "'" + │ │ └── unescaped: "\n" │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (2,2)-(2,3)) + ├── flags: variable_call ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :b @@ -30,5 +31,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: variable_call + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/super_arg.txt b/test/prism/snapshots/seattlerb/super_arg.txt index f3b4faf572..a7f13a4adf 100644 --- a/test/prism/snapshots/seattlerb/super_arg.txt +++ b/test/prism/snapshots/seattlerb/super_arg.txt @@ -8,9 +8,9 @@ ├── lparen_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,6)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,6)-(1,8)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,6)-(1,8)) + │ └── flags: decimal ├── rparen_loc: ∅ └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/symbol_list.txt b/test/prism/snapshots/seattlerb/symbol_list.txt index bdb901daaf..212edfcbc7 100644 --- a/test/prism/snapshots/seattlerb/symbol_list.txt +++ b/test/prism/snapshots/seattlerb/symbol_list.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,13)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,13)) + ├── flags: ∅ ├── elements: (length: 2) │ ├── @ InterpolatedSymbolNode (location: (1,3)-(1,7)) │ │ ├── opening_loc: ∅ @@ -14,6 +15,7 @@ │ │ │ │ @ StatementsNode (location: (1,5)-(1,6)) │ │ │ │ └── body: (length: 1) │ │ │ │ └── @ CallNode (location: (1,5)-(1,6)) + │ │ │ │ ├── flags: variable_call │ │ │ │ ├── receiver: ∅ │ │ │ │ ├── call_operator_loc: ∅ │ │ │ │ ├── name: :a @@ -21,8 +23,7 @@ │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: ∅ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ ├── block: ∅ - │ │ │ │ └── flags: variable_call + │ │ │ │ └── block: ∅ │ │ │ └── closing_loc: (1,6)-(1,7) = "}" │ │ └── closing_loc: ∅ │ └── @ InterpolatedSymbolNode (location: (1,8)-(1,12)) @@ -34,6 +35,7 @@ │ │ │ @ StatementsNode (location: (1,10)-(1,11)) │ │ │ └── body: (length: 1) │ │ │ └── @ CallNode (location: (1,10)-(1,11)) + │ │ │ ├── flags: variable_call │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── name: :b @@ -41,10 +43,8 @@ │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: variable_call + │ │ │ └── block: ∅ │ │ └── closing_loc: (1,11)-(1,12) = "}" │ └── closing_loc: ∅ ├── opening_loc: (1,0)-(1,3) = "%I[" - ├── closing_loc: (1,12)-(1,13) = "]" - └── flags: ∅ + └── closing_loc: (1,12)-(1,13) = "]" diff --git a/test/prism/snapshots/seattlerb/symbols.txt b/test/prism/snapshots/seattlerb/symbols.txt index 2eb9da1be9..936acc01f3 100644 --- a/test/prism/snapshots/seattlerb/symbols.txt +++ b/test/prism/snapshots/seattlerb/symbols.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,9)) + ├── flags: ∅ ├── elements: (length: 3) │ ├── @ SymbolNode (location: (1,3)-(1,4)) │ │ ├── opening_loc: ∅ @@ -21,5 +22,4 @@ │ ├── closing_loc: ∅ │ └── unescaped: "c" ├── opening_loc: (1,0)-(1,3) = "%i(" - ├── closing_loc: (1,8)-(1,9) = ")" - └── flags: ∅ + └── closing_loc: (1,8)-(1,9) = ")" diff --git a/test/prism/snapshots/seattlerb/symbols_empty.txt b/test/prism/snapshots/seattlerb/symbols_empty.txt index 93db50109f..dc743e2be5 100644 --- a/test/prism/snapshots/seattlerb/symbols_empty.txt +++ b/test/prism/snapshots/seattlerb/symbols_empty.txt @@ -4,7 +4,7 @@ @ StatementsNode (location: (1,0)-(1,4)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,4)) + ├── flags: ∅ ├── elements: (length: 0) ├── opening_loc: (1,0)-(1,3) = "%i(" - ├── closing_loc: (1,3)-(1,4) = ")" - └── flags: ∅ + └── closing_loc: (1,3)-(1,4) = ")" diff --git a/test/prism/snapshots/seattlerb/symbols_empty_space.txt b/test/prism/snapshots/seattlerb/symbols_empty_space.txt index a74d76649d..ea7ada9446 100644 --- a/test/prism/snapshots/seattlerb/symbols_empty_space.txt +++ b/test/prism/snapshots/seattlerb/symbols_empty_space.txt @@ -4,7 +4,7 @@ @ StatementsNode (location: (1,0)-(1,5)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,5)) + ├── flags: ∅ ├── elements: (length: 0) ├── opening_loc: (1,0)-(1,3) = "%i(" - ├── closing_loc: (1,4)-(1,5) = ")" - └── flags: ∅ + └── closing_loc: (1,4)-(1,5) = ")" diff --git a/test/prism/snapshots/seattlerb/symbols_interp.txt b/test/prism/snapshots/seattlerb/symbols_interp.txt index c7a0b41c3b..a86d41f448 100644 --- a/test/prism/snapshots/seattlerb/symbols_interp.txt +++ b/test/prism/snapshots/seattlerb/symbols_interp.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,15)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,15)) + ├── flags: ∅ ├── elements: (length: 3) │ ├── @ SymbolNode (location: (1,3)-(1,4)) │ │ ├── opening_loc: ∅ @@ -21,5 +22,4 @@ │ ├── closing_loc: ∅ │ └── unescaped: "c" ├── opening_loc: (1,0)-(1,3) = "%i(" - ├── closing_loc: (1,14)-(1,15) = ")" - └── flags: ∅ + └── closing_loc: (1,14)-(1,15) = ")" diff --git a/test/prism/snapshots/seattlerb/thingy.txt b/test/prism/snapshots/seattlerb/thingy.txt index 244d858e2e..63ec8c7e36 100644 --- a/test/prism/snapshots/seattlerb/thingy.txt +++ b/test/prism/snapshots/seattlerb/thingy.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(3,7)) └── body: (length: 2) ├── @ CallNode (location: (1,0)-(1,6)) + │ ├── flags: ∅ │ ├── receiver: │ │ @ CallNode (location: (1,0)-(1,1)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :f @@ -13,24 +15,24 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ ├── call_operator_loc: (1,1)-(1,2) = "." │ ├── name: :call │ ├── message_loc: ∅ │ ├── opening_loc: (1,2)-(1,3) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,3)-(1,5)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ IntegerNode (location: (1,3)-(1,5)) - │ │ │ └── flags: decimal - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (1,3)-(1,5)) + │ │ └── flags: decimal │ ├── closing_loc: (1,5)-(1,6) = ")" - │ ├── block: ∅ - │ └── flags: ∅ + │ └── block: ∅ └── @ CallNode (location: (3,0)-(3,7)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (3,0)-(3,1)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :f @@ -38,18 +40,16 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: (3,1)-(3,3) = "::" ├── name: :call ├── message_loc: ∅ ├── opening_loc: (3,3)-(3,4) = "(" ├── arguments: │ @ ArgumentsNode (location: (3,4)-(3,6)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (3,4)-(3,6)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (3,4)-(3,6)) + │ └── flags: decimal ├── closing_loc: (3,6)-(3,7) = ")" - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/unary_minus.txt b/test/prism/snapshots/seattlerb/unary_minus.txt index d68788f89b..53fe7a65f2 100644 --- a/test/prism/snapshots/seattlerb/unary_minus.txt +++ b/test/prism/snapshots/seattlerb/unary_minus.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,2)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,2)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,1)-(1,2)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :-@ ├── message_loc: (1,0)-(1,1) = "-" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/unary_plus.txt b/test/prism/snapshots/seattlerb/unary_plus.txt index 9061198242..34ea027ce3 100644 --- a/test/prism/snapshots/seattlerb/unary_plus.txt +++ b/test/prism/snapshots/seattlerb/unary_plus.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,2)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,2)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,1)-(1,2)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :+@ ├── message_loc: (1,0)-(1,1) = "+" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt b/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt index f910059153..7564d00ba1 100644 --- a/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt +++ b/test/prism/snapshots/seattlerb/unary_plus_on_literal.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,3)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,3)) + ├── flags: ∅ ├── receiver: │ @ SymbolNode (location: (1,1)-(1,3)) │ ├── opening_loc: (1,1)-(1,2) = ":" @@ -16,5 +17,4 @@ ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/unary_tilde.txt b/test/prism/snapshots/seattlerb/unary_tilde.txt index 5ba20eb961..7268b99cd3 100644 --- a/test/prism/snapshots/seattlerb/unary_tilde.txt +++ b/test/prism/snapshots/seattlerb/unary_tilde.txt @@ -4,8 +4,10 @@ @ StatementsNode (location: (1,0)-(1,2)) └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,2)) + ├── flags: ∅ ├── receiver: │ @ CallNode (location: (1,1)-(1,2)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,13 +15,11 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── call_operator_loc: ∅ ├── name: :~ ├── message_loc: (1,0)-(1,1) = "~" ├── opening_loc: ∅ ├── arguments: ∅ ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/utf8_bom.txt b/test/prism/snapshots/seattlerb/utf8_bom.txt index af5ce88bdb..ad48aa068f 100644 --- a/test/prism/snapshots/seattlerb/utf8_bom.txt +++ b/test/prism/snapshots/seattlerb/utf8_bom.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (2,0)-(2,3)) └── body: (length: 1) └── @ CallNode (location: (2,0)-(2,3)) + ├── flags: ∅ ├── receiver: ∅ ├── call_operator_loc: ∅ ├── name: :p @@ -11,10 +12,9 @@ ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (2,2)-(2,3)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (2,2)-(2,3)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (2,2)-(2,3)) + │ └── flags: decimal ├── closing_loc: ∅ - ├── block: ∅ - └── flags: ∅ + └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/when_splat.txt b/test/prism/snapshots/seattlerb/when_splat.txt index f47f501738..bd5928ca8b 100644 --- a/test/prism/snapshots/seattlerb/when_splat.txt +++ b/test/prism/snapshots/seattlerb/when_splat.txt @@ -6,6 +6,7 @@ └── @ CaseNode (location: (1,0)-(1,25)) ├── predicate: │ @ CallNode (location: (1,5)-(1,6)) + │ ├── flags: variable_call │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :a @@ -13,8 +14,7 @@ │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ - │ ├── block: ∅ - │ └── flags: variable_call + │ └── block: ∅ ├── conditions: (length: 1) │ └── @ WhenNode (location: (1,8)-(1,15)) │ ├── keyword_loc: (1,8)-(1,12) = "when" @@ -23,6 +23,7 @@ │ │ ├── operator_loc: (1,13)-(1,14) = "*" │ │ └── expression: │ │ @ CallNode (location: (1,14)-(1,15)) + │ │ ├── flags: variable_call │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :b @@ -30,8 +31,7 @@ │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ └── flags: variable_call + │ │ └── block: ∅ │ └── statements: ∅ ├── consequent: ∅ ├── case_keyword_loc: (1,0)-(1,4) = "case" diff --git a/test/prism/snapshots/seattlerb/words_interp.txt b/test/prism/snapshots/seattlerb/words_interp.txt index c47cc6b5f7..864f826dcb 100644 --- a/test/prism/snapshots/seattlerb/words_interp.txt +++ b/test/prism/snapshots/seattlerb/words_interp.txt @@ -4,6 +4,7 @@ @ StatementsNode (location: (1,0)-(1,9)) └── body: (length: 1) └── @ ArrayNode (location: (1,0)-(1,9)) + ├── flags: ∅ ├── elements: (length: 1) │ └── @ InterpolatedStringNode (location: (1,3)-(1,8)) │ ├── opening_loc: ∅ @@ -24,5 +25,4 @@ │ │ └── unescaped: "b" │ └── closing_loc: ∅ ├── opening_loc: (1,0)-(1,3) = "%W(" - ├── closing_loc: (1,8)-(1,9) = ")" - └── flags: ∅ + └── closing_loc: (1,8)-(1,9) = ")" diff --git a/test/prism/snapshots/seattlerb/yield_arg.txt b/test/prism/snapshots/seattlerb/yield_arg.txt index 808af4c91c..d297e5acdb 100644 --- a/test/prism/snapshots/seattlerb/yield_arg.txt +++ b/test/prism/snapshots/seattlerb/yield_arg.txt @@ -8,8 +8,8 @@ ├── lparen_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,6)-(1,8)) - │ ├── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (1,6)-(1,8)) - │ │ └── flags: decimal - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ IntegerNode (location: (1,6)-(1,8)) + │ └── flags: decimal └── rparen_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/yield_call_assocs.txt b/test/prism/snapshots/seattlerb/yield_call_assocs.txt index 5424c5558e..cade701ce3 100644 --- a/test/prism/snapshots/seattlerb/yield_call_assocs.txt +++ b/test/prism/snapshots/seattlerb/yield_call_assocs.txt @@ -8,196 +8,196 @@ │ ├── lparen_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (1,6)-(1,16)) - │ │ ├── arguments: (length: 2) - │ │ │ ├── @ IntegerNode (location: (1,6)-(1,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── @ KeywordHashNode (location: (1,9)-(1,16)) - │ │ │ └── elements: (length: 1) - │ │ │ └── @ AssocNode (location: (1,9)-(1,16)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (1,9)-(1,11)) - │ │ │ │ ├── opening_loc: (1,9)-(1,10) = ":" - │ │ │ │ ├── value_loc: (1,10)-(1,11) = "z" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "z" - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (1,15)-(1,16)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: (1,12)-(1,14) = "=>" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 2) + │ │ ├── @ IntegerNode (location: (1,6)-(1,7)) + │ │ │ └── flags: decimal + │ │ └── @ KeywordHashNode (location: (1,9)-(1,16)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (1,9)-(1,16)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (1,9)-(1,11)) + │ │ │ ├── opening_loc: (1,9)-(1,10) = ":" + │ │ │ ├── value_loc: (1,10)-(1,11) = "z" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "z" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (1,15)-(1,16)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: (1,12)-(1,14) = "=>" │ └── rparen_loc: ∅ ├── @ YieldNode (location: (3,0)-(3,25)) │ ├── keyword_loc: (3,0)-(3,5) = "yield" │ ├── lparen_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (3,6)-(3,25)) - │ │ ├── arguments: (length: 2) - │ │ │ ├── @ IntegerNode (location: (3,6)-(3,7)) - │ │ │ │ └── flags: decimal - │ │ │ └── @ KeywordHashNode (location: (3,9)-(3,25)) - │ │ │ └── elements: (length: 2) - │ │ │ ├── @ AssocNode (location: (3,9)-(3,16)) - │ │ │ │ ├── key: - │ │ │ │ │ @ SymbolNode (location: (3,9)-(3,11)) - │ │ │ │ │ ├── opening_loc: (3,9)-(3,10) = ":" - │ │ │ │ │ ├── value_loc: (3,10)-(3,11) = "z" - │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ └── unescaped: "z" - │ │ │ │ ├── value: - │ │ │ │ │ @ IntegerNode (location: (3,15)-(3,16)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── operator_loc: (3,12)-(3,14) = "=>" - │ │ │ └── @ AssocNode (location: (3,18)-(3,25)) - │ │ │ ├── key: - │ │ │ │ @ SymbolNode (location: (3,18)-(3,20)) - │ │ │ │ ├── opening_loc: (3,18)-(3,19) = ":" - │ │ │ │ ├── value_loc: (3,19)-(3,20) = "w" - │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ └── unescaped: "w" - │ │ │ ├── value: - │ │ │ │ @ IntegerNode (location: (3,24)-(3,25)) - │ │ │ │ └── flags: decimal - │ │ │ └── operator_loc: (3,21)-(3,23) = "=>" - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 2) + │ │ ├── @ IntegerNode (location: (3,6)-(3,7)) + │ │ │ └── flags: decimal + │ │ └── @ KeywordHashNode (location: (3,9)-(3,25)) + │ │ └── elements: (length: 2) + │ │ ├── @ AssocNode (location: (3,9)-(3,16)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (3,9)-(3,11)) + │ │ │ │ ├── opening_loc: (3,9)-(3,10) = ":" + │ │ │ │ ├── value_loc: (3,10)-(3,11) = "z" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "z" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (3,15)-(3,16)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: (3,12)-(3,14) = "=>" + │ │ └── @ AssocNode (location: (3,18)-(3,25)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (3,18)-(3,20)) + │ │ │ ├── opening_loc: (3,18)-(3,19) = ":" + │ │ │ ├── value_loc: (3,19)-(3,20) = "w" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "w" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (3,24)-(3,25)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: (3,21)-(3,23) = "=>" │ └── rparen_loc: ∅ ├── @ YieldNode (location: (5,0)-(5,13)) │ ├── keyword_loc: (5,0)-(5,5) = "yield" │ ├── lparen_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (5,6)-(5,13)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (5,6)-(5,13)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :y - │ │ │ ├── message_loc: (5,6)-(5,7) = "y" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: - │ │ │ │ @ ArgumentsNode (location: (5,8)-(5,13)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ KeywordHashNode (location: (5,8)-(5,13)) - │ │ │ │ │ └── elements: (length: 1) - │ │ │ │ │ └── @ AssocNode (location: (5,8)-(5,13)) - │ │ │ │ │ ├── key: - │ │ │ │ │ │ @ SymbolNode (location: (5,8)-(5,10)) - │ │ │ │ │ │ ├── opening_loc: (5,8)-(5,9) = ":" - │ │ │ │ │ │ ├── value_loc: (5,9)-(5,10) = "z" - │ │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ │ └── unescaped: "z" - │ │ │ │ │ ├── value: - │ │ │ │ │ │ @ IntegerNode (location: (5,12)-(5,13)) - │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ └── operator_loc: (5,10)-(5,12) = "=>" - │ │ │ │ └── flags: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (5,6)-(5,13)) + │ │ ├── flags: ∅ + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :y + │ │ ├── message_loc: (5,6)-(5,7) = "y" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: + │ │ │ @ ArgumentsNode (location: (5,8)-(5,13)) + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ KeywordHashNode (location: (5,8)-(5,13)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (5,8)-(5,13)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (5,8)-(5,10)) + │ │ │ │ ├── opening_loc: (5,8)-(5,9) = ":" + │ │ │ │ ├── value_loc: (5,9)-(5,10) = "z" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "z" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (5,12)-(5,13)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: (5,10)-(5,12) = "=>" + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ └── rparen_loc: ∅ ├── @ YieldNode (location: (7,0)-(7,11)) │ ├── keyword_loc: (7,0)-(7,5) = "yield" │ ├── lparen_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (7,6)-(7,11)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (7,6)-(7,11)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :y - │ │ │ ├── message_loc: (7,6)-(7,7) = "y" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: - │ │ │ │ @ ArgumentsNode (location: (7,8)-(7,11)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ KeywordHashNode (location: (7,8)-(7,11)) - │ │ │ │ │ └── elements: (length: 1) - │ │ │ │ │ └── @ AssocNode (location: (7,8)-(7,11)) - │ │ │ │ │ ├── key: - │ │ │ │ │ │ @ SymbolNode (location: (7,8)-(7,10)) - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── value_loc: (7,8)-(7,9) = "z" - │ │ │ │ │ │ ├── closing_loc: (7,9)-(7,10) = ":" - │ │ │ │ │ │ └── unescaped: "z" - │ │ │ │ │ ├── value: - │ │ │ │ │ │ @ IntegerNode (location: (7,10)-(7,11)) - │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ └── operator_loc: ∅ - │ │ │ │ └── flags: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (7,6)-(7,11)) + │ │ ├── flags: ∅ + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :y + │ │ ├── message_loc: (7,6)-(7,7) = "y" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: + │ │ │ @ ArgumentsNode (location: (7,8)-(7,11)) + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ KeywordHashNode (location: (7,8)-(7,11)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (7,8)-(7,11)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (7,8)-(7,10)) + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── value_loc: (7,8)-(7,9) = "z" + │ │ │ │ ├── closing_loc: (7,9)-(7,10) = ":" + │ │ │ │ └── unescaped: "z" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (7,10)-(7,11)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ │ └── rparen_loc: ∅ ├── @ YieldNode (location: (9,0)-(9,12)) │ ├── keyword_loc: (9,0)-(9,5) = "yield" │ ├── lparen_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (9,6)-(9,12)) - │ │ ├── arguments: (length: 1) - │ │ │ └── @ CallNode (location: (9,6)-(9,12)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── name: :y - │ │ │ ├── message_loc: (9,6)-(9,7) = "y" - │ │ │ ├── opening_loc: (9,7)-(9,8) = "(" - │ │ │ ├── arguments: - │ │ │ │ @ ArgumentsNode (location: (9,8)-(9,11)) - │ │ │ │ ├── arguments: (length: 1) - │ │ │ │ │ └── @ KeywordHashNode (location: (9,8)-(9,11)) - │ │ │ │ │ └── elements: (length: 1) - │ │ │ │ │ └── @ AssocNode (location: (9,8)-(9,11)) - │ │ │ │ │ ├── key: - │ │ │ │ │ │ @ SymbolNode (location: (9,8)-(9,10)) - │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── value_loc: (9,8)-(9,9) = "z" - │ │ │ │ │ │ ├── closing_loc: (9,9)-(9,10) = ":" - │ │ │ │ │ │ └── unescaped: "z" - │ │ │ │ │ ├── value: - │ │ │ │ │ │ @ IntegerNode (location: (9,10)-(9,11)) - │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ └── operator_loc: ∅ - │ │ │ │ └── flags: ∅ - │ │ │ ├── closing_loc: (9,11)-(9,12) = ")" - │ │ │ ├── block: ∅ - │ │ │ └── flags: ∅ - │ │ └── flags: ∅ + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (9,6)-(9,12)) + │ │ ├── flags: ∅ + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :y + │ │ ├── message_loc: (9,6)-(9,7) = "y" + │ │ ├── opening_loc: (9,7)-(9,8) = "(" + │ │ ├── arguments: + │ │ │ @ ArgumentsNode (location: (9,8)-(9,11)) + │ │ │ ├── flags: ∅ + │ │ │ └── arguments: (length: 1) + │ │ │ └── @ KeywordHashNode (location: (9,8)-(9,11)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (9,8)-(9,11)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (9,8)-(9,10)) + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── value_loc: (9,8)-(9,9) = "z" + │ │ │ │ ├── closing_loc: (9,9)-(9,10) = ":" + │ │ │ │ └── unescaped: "z" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (9,10)-(9,11)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: ∅ + │ │ ├── closing_loc: (9,11)-(9,12) = ")" + │ │ └── block: ∅ │ └── rparen_loc: ∅ └── @ YieldNode (location: (11,0)-(11,13)) ├── keyword_loc: (11,0)-(11,5) = "yield" ├── lparen_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (11,6)-(11,13)) - │ ├── arguments: (length: 1) - │ │ └── @ CallNode (location: (11,6)-(11,13)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── name: :y - │ │ ├── message_loc: (11,6)-(11,7) = "y" - │ │ ├── opening_loc: (11,7)-(11,8) = "(" - │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (11,8)-(11,12)) - │ │ │ ├── arguments: (length: 1) - │ │ │ │ └── @ KeywordHashNode (location: (11,8)-(11,12)) - │ │ │ │ └── elements: (length: 1) - │ │ │ │ └── @ AssocNode (location: (11,8)-(11,12)) - │ │ │ │ ├── key: - │ │ │ │ │ @ CallNode (location: (11,8)-(11,9)) - │ │ │ │ │ ├── receiver: ∅ - │ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ │ ├── name: :z - │ │ │ │ │ ├── message_loc: (11,8)-(11,9) = "z" - │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── arguments: ∅ - │ │ │ │ │ ├── closing_loc: ∅ - │ │ │ │ │ ├── block: ∅ - │ │ │ │ │ └── flags: variable_call - │ │ │ │ ├── value: - │ │ │ │ │ @ IntegerNode (location: (11,11)-(11,12)) - │ │ │ │ │ └── flags: decimal - │ │ │ │ └── operator_loc: (11,9)-(11,11) = "=>" - │ │ │ └── flags: ∅ - │ │ ├── closing_loc: (11,12)-(11,13) = ")" - │ │ ├── block: ∅ - │ │ └── flags: ∅ - │ └── flags: ∅ + │ ├── flags: ∅ + │ └── arguments: (length: 1) + │ └── @ CallNode (location: (11,6)-(11,13)) + │ ├── flags: ∅ + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :y + │ ├── message_loc: (11,6)-(11,7) = "y" + │ ├── opening_loc: (11,7)-(11,8) = "(" + │ ├── arguments: + │ │ @ ArgumentsNode (location: (11,8)-(11,12)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (11,8)-(11,12)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (11,8)-(11,12)) + │ │ ├── key: + │ │ │ @ CallNode (location: (11,8)-(11,9)) + │ │ │ ├── flags: variable_call + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :z + │ │ │ ├── message_loc: (11,8)-(11,9) = "z" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── value: + │ │ │ @ IntegerNode (location: (11,11)-(11,12)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: (11,9)-(11,11) = "=>" + │ ├── closing_loc: (11,12)-(11,13) = ")" + │ └── block: ∅ └── rparen_loc: ∅ |