diff options
author | Benoit Daloze <eregontp@gmail.com> | 2023-08-30 22:48:17 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-01 13:18:30 +0000 |
commit | a21b5a943fe20892168eb76ecd1723191650da30 (patch) | |
tree | c7ec7b8eb98803839fa06079fff6f5657a41bd13 /test | |
parent | f1f6f1b39ebec35462efed9b20bfac4b6409133f (diff) | |
download | ruby-a21b5a943fe20892168eb76ecd1723191650da30.tar.gz |
[ruby/yarp] Move name_loc before value for LocalVariableWriteNode
* Consistent with ClassVariableWriteNode, ConstantWriteNode, InstanceVariableWriteNode, GlobalVariableWriteNode.
* Fixes desugaring of local variable with operators.
https://github.com/ruby/yarp/commit/9a66737775
Diffstat (limited to 'test')
56 files changed, 105 insertions, 105 deletions
diff --git a/test/yarp/errors_test.rb b/test/yarp/errors_test.rb index f29bd746c8..faf840e925 100644 --- a/test/yarp/errors_test.rb +++ b/test/yarp/errors_test.rb @@ -513,16 +513,16 @@ module YARP expected = BeginNode( Location(), StatementsNode([ - LocalVariableWriteNode(:_1, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_2, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_3, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_4, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_5, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_6, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_7, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_8, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_9, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()), - LocalVariableWriteNode(:_10, 0, SymbolNode(Location(), Location(), nil, "a"), Location(), Location()) + LocalVariableWriteNode(:_1, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_2, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_3, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_4, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_5, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_6, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_7, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_8, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_9, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()), + LocalVariableWriteNode(:_10, 0, Location(), SymbolNode(Location(), Location(), nil, "a"), Location()) ]), nil, nil, diff --git a/test/yarp/snapshots/blocks.txt b/test/yarp/snapshots/blocks.txt index 8f836208ca..4a2c3f7585 100644 --- a/test/yarp/snapshots/blocks.txt +++ b/test/yarp/snapshots/blocks.txt @@ -453,8 +453,8 @@ ProgramNode(0...402)( LocalVariableWriteNode(292...300)( :fork, 0, - IntegerNode(299...300)(), (292...296), + IntegerNode(299...300)(), (297...298) ), CallNode(301...316)( diff --git a/test/yarp/snapshots/classes.txt b/test/yarp/snapshots/classes.txt index 33b3d04214..1d8813f40e 100644 --- a/test/yarp/snapshots/classes.txt +++ b/test/yarp/snapshots/classes.txt @@ -11,8 +11,8 @@ ProgramNode(0...370)( [LocalVariableWriteNode(8...13)( :a, 0, - IntegerNode(12...13)(), (8...9), + IntegerNode(12...13)(), (10...11) )] ), @@ -63,8 +63,8 @@ ProgramNode(0...370)( [LocalVariableWriteNode(89...94)( :a, 0, - IntegerNode(93...94)(), (89...90), + IntegerNode(93...94)(), (91...92) )] ), diff --git a/test/yarp/snapshots/dos_endings.txt b/test/yarp/snapshots/dos_endings.txt index 240ae043a4..7048028b2a 100644 --- a/test/yarp/snapshots/dos_endings.txt +++ b/test/yarp/snapshots/dos_endings.txt @@ -35,13 +35,14 @@ ProgramNode(0...108)( LocalVariableWriteNode(75...84)( :x, 0, - StringNode(79...84)((79...82), (82...82), (82...84), ""), (75...76), + StringNode(79...84)((79...82), (82...82), (82...84), ""), (77...78) ), LocalVariableWriteNode(88...108)( :a, 0, + (88...89), CallNode(92...108)( nil, nil, @@ -74,7 +75,6 @@ ProgramNode(0...108)( 0, "foo" ), - (88...89), (90...91) )] ) diff --git a/test/yarp/snapshots/methods.txt b/test/yarp/snapshots/methods.txt index b5ec66aae3..79d11f1038 100644 --- a/test/yarp/snapshots/methods.txt +++ b/test/yarp/snapshots/methods.txt @@ -298,8 +298,8 @@ ProgramNode(0...1194)( LocalVariableWriteNode(275...280)( :a, 0, - IntegerNode(279...280)(), (275...276), + IntegerNode(279...280)(), (277...278) ), DefNode(282...291)( @@ -589,8 +589,8 @@ ProgramNode(0...1194)( [LocalVariableWriteNode(537...542)( :b, 0, - IntegerNode(541...542)(), (537...538), + IntegerNode(541...542)(), (539...540) )] ), @@ -839,6 +839,7 @@ ProgramNode(0...1194)( LocalVariableWriteNode(769...774)( :c, 0, + (769...770), CallNode(773...774)( nil, nil, @@ -850,7 +851,6 @@ ProgramNode(0...1194)( 2, "b" ), - (769...770), (771...772) ), (768...769), @@ -927,6 +927,7 @@ ProgramNode(0...1194)( LocalVariableWriteNode(833...838)( :a, 0, + (833...834), CallNode(837...838)( nil, nil, @@ -938,7 +939,6 @@ ProgramNode(0...1194)( 2, "b" ), - (833...834), (835...836) ), (832...833), diff --git a/test/yarp/snapshots/modules.txt b/test/yarp/snapshots/modules.txt index a3cf30b9ff..aa8c1a743d 100644 --- a/test/yarp/snapshots/modules.txt +++ b/test/yarp/snapshots/modules.txt @@ -9,8 +9,8 @@ ProgramNode(0...140)( [LocalVariableWriteNode(9...14)( :a, 0, - IntegerNode(13...14)(), (9...10), + IntegerNode(13...14)(), (11...12) )] ), @@ -62,8 +62,8 @@ ProgramNode(0...140)( [LocalVariableWriteNode(67...72)( :x, 0, - IntegerNode(71...72)(), (67...68), + IntegerNode(71...72)(), (69...70) )] ), diff --git a/test/yarp/snapshots/rescue.txt b/test/yarp/snapshots/rescue.txt index b8944afd19..c52a261fce 100644 --- a/test/yarp/snapshots/rescue.txt +++ b/test/yarp/snapshots/rescue.txt @@ -192,6 +192,7 @@ ProgramNode(0...316)( LocalVariableWriteNode(217...235)( :a, 0, + (217...218), RescueModifierNode(221...235)( CallNode(221...224)( nil, @@ -207,7 +208,6 @@ ProgramNode(0...316)( (225...231), NilNode(232...235)() ), - (217...218), (219...220) ), StatementsNode(238...241)( diff --git a/test/yarp/snapshots/seattlerb/bug202.txt b/test/yarp/snapshots/seattlerb/bug202.txt index 64e666ef3f..cbed9a6712 100644 --- a/test/yarp/snapshots/seattlerb/bug202.txt +++ b/test/yarp/snapshots/seattlerb/bug202.txt @@ -5,8 +5,8 @@ ProgramNode(0...22)( LocalVariableWriteNode(12...22)( :测试, 0, - IntegerNode(21...22)(), (12...18), + IntegerNode(21...22)(), (19...20) )] ) diff --git a/test/yarp/snapshots/seattlerb/dasgn_icky2.txt b/test/yarp/snapshots/seattlerb/dasgn_icky2.txt index 2aba42cc79..8fbbf8ec0a 100644 --- a/test/yarp/snapshots/seattlerb/dasgn_icky2.txt +++ b/test/yarp/snapshots/seattlerb/dasgn_icky2.txt @@ -15,8 +15,8 @@ ProgramNode(0...76)( [LocalVariableWriteNode(7...14)( :v, 0, - NilNode(11...14)(), (7...8), + NilNode(11...14)(), (9...10) ), BeginNode(17...72)( diff --git a/test/yarp/snapshots/seattlerb/difficult1_line_numbers2.txt b/test/yarp/snapshots/seattlerb/difficult1_line_numbers2.txt index 86433437ce..d19d6d817b 100644 --- a/test/yarp/snapshots/seattlerb/difficult1_line_numbers2.txt +++ b/test/yarp/snapshots/seattlerb/difficult1_line_numbers2.txt @@ -21,8 +21,8 @@ ProgramNode(0...48)( LocalVariableWriteNode(24...29)( :b, 0, - IntegerNode(28...29)(), (24...25), + IntegerNode(28...29)(), (26...27) ), CallNode(32...35)( @@ -39,8 +39,8 @@ ProgramNode(0...48)( LocalVariableWriteNode(38...42)( :c, 0, - IntegerNode(41...42)(), (38...39), + IntegerNode(41...42)(), (40...41) )] ), diff --git a/test/yarp/snapshots/seattlerb/difficult3_4.txt b/test/yarp/snapshots/seattlerb/difficult3_4.txt index afca77c5fa..40ebfca661 100644 --- a/test/yarp/snapshots/seattlerb/difficult3_4.txt +++ b/test/yarp/snapshots/seattlerb/difficult3_4.txt @@ -4,6 +4,7 @@ ProgramNode(0...17)( [LocalVariableWriteNode(0...17)( :a, 0, + (0...1), IfNode(2...17)( nil, CallNode(2...3)(nil, nil, (2...3), nil, nil, nil, nil, 2, "b"), @@ -15,7 +16,6 @@ ProgramNode(0...17)( ), nil ), - (0...1), (1...2) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc__backslash_dos_format.txt b/test/yarp/snapshots/seattlerb/heredoc__backslash_dos_format.txt index d8a5d9354f..befdff81ee 100644 --- a/test/yarp/snapshots/seattlerb/heredoc__backslash_dos_format.txt +++ b/test/yarp/snapshots/seattlerb/heredoc__backslash_dos_format.txt @@ -4,12 +4,12 @@ ProgramNode(0...12)( [LocalVariableWriteNode(0...12)( :str, 0, + (0...3), InterpolatedStringNode(6...12)( (6...12), [StringNode(14...30)(nil, (14...30), nil, "beforeafter\r\n")], (30...35) ), - (0...3), (4...5) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_bad_hex_escape.txt b/test/yarp/snapshots/seattlerb/heredoc_bad_hex_escape.txt index 4bc1846ef1..842da16d1d 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_bad_hex_escape.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_bad_hex_escape.txt @@ -4,12 +4,12 @@ ProgramNode(0...9)( [LocalVariableWriteNode(0...9)( :s, 0, + (0...1), InterpolatedStringNode(4...9)( (4...9), [StringNode(10...17)(nil, (10...17), nil, "a\xE9b\n")], (17...21) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_bad_oct_escape.txt b/test/yarp/snapshots/seattlerb/heredoc_bad_oct_escape.txt index ebfb3b4da3..14c02bdfb3 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_bad_oct_escape.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_bad_oct_escape.txt @@ -4,12 +4,12 @@ ProgramNode(0...10)( [LocalVariableWriteNode(0...10)( :s, 0, + (0...1), InterpolatedStringNode(4...10)( (4...10), [StringNode(11...23)(nil, (11...23), nil, "a\xA7b\n" + "cöd\n")], (23...27) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_lineno.txt b/test/yarp/snapshots/seattlerb/heredoc_lineno.txt index 27708e2538..9bbc817c20 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_lineno.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_lineno.txt @@ -4,6 +4,7 @@ ProgramNode(0...41)( [LocalVariableWriteNode(0...11)( :c, 0, + (0...1), InterpolatedStringNode(4...11)( (4...11), [StringNode(12...30)( @@ -14,14 +15,13 @@ ProgramNode(0...41)( )], (30...34) ), - (0...1), (2...3) ), LocalVariableWriteNode(35...41)( :d, 0, - IntegerNode(39...41)(), (35...36), + IntegerNode(39...41)(), (37...38) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_squiggly.txt b/test/yarp/snapshots/seattlerb/heredoc_squiggly.txt index a1013d9e84..6491c86c04 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_squiggly.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_squiggly.txt @@ -4,12 +4,12 @@ ProgramNode(0...12)( [LocalVariableWriteNode(0...12)( :a, 0, + (0...1), InterpolatedStringNode(4...12)( (4...12), [StringNode(13...25)(nil, (13...25), nil, "x\n" + "y\n" + "z\n")], (25...31) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt b/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt index e78764e926..f2c3c1b1a9 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt @@ -4,6 +4,7 @@ ProgramNode(0...20)( [LocalVariableWriteNode(0...20)( :a, 0, + (0...1), CallNode(4...20)( nil, nil, @@ -49,7 +50,6 @@ ProgramNode(0...20)( 0, "foo" ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt b/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt index 3bb7807c5c..4b59c35246 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt @@ -4,12 +4,12 @@ ProgramNode(0...10)( [LocalVariableWriteNode(0...10)( :a, 0, + (0...1), InterpolatedStringNode(4...10)( (4...10), [StringNode(11...20)(nil, (11...20), nil, "x\n" + "\n" + "z\n")], (20...24) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_squiggly_interp.txt b/test/yarp/snapshots/seattlerb/heredoc_squiggly_interp.txt index f895e997e7..e03304a7d1 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_squiggly_interp.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_squiggly_interp.txt @@ -4,6 +4,7 @@ ProgramNode(0...10)( [LocalVariableWriteNode(0...10)( :a, 0, + (0...1), InterpolatedStringNode(4...10)( (4...10), [StringNode(11...22)(nil, (11...22), nil, " w\n" + "x"), @@ -15,7 +16,6 @@ ProgramNode(0...10)( StringNode(27...36)(nil, (27...36), nil, " y\n" + " z\n")], (36...42) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs.txt b/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs.txt index 13d1844e3c..1592d13104 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs.txt @@ -4,6 +4,7 @@ ProgramNode(0...12)( [LocalVariableWriteNode(0...12)( :a, 0, + (0...1), InterpolatedStringNode(4...12)( (4...12), [StringNode(13...43)( @@ -14,7 +15,6 @@ ProgramNode(0...12)( )], (43...49) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt b/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt index da631943fc..63ff5887c9 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt @@ -4,6 +4,7 @@ ProgramNode(0...12)( [LocalVariableWriteNode(0...12)( :a, 0, + (0...1), InterpolatedStringNode(4...12)( (4...12), [StringNode(13...37)( @@ -14,7 +15,6 @@ ProgramNode(0...12)( )], (37...43) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt b/test/yarp/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt index 680ffbe0a6..866c5fac08 100644 --- a/test/yarp/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt +++ b/test/yarp/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt @@ -4,12 +4,12 @@ ProgramNode(0...10)( [LocalVariableWriteNode(0...10)( :a, 0, + (0...1), InterpolatedStringNode(4...10)( (4...10), [StringNode(11...21)(nil, (11...21), nil, "x\n" + "\n" + "z\n")], (21...25) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/lasgn_arg_rescue_arg.txt b/test/yarp/snapshots/seattlerb/lasgn_arg_rescue_arg.txt index 03ec05d3a3..ad36a5edb4 100644 --- a/test/yarp/snapshots/seattlerb/lasgn_arg_rescue_arg.txt +++ b/test/yarp/snapshots/seattlerb/lasgn_arg_rescue_arg.txt @@ -4,12 +4,12 @@ ProgramNode(0...14)( [LocalVariableWriteNode(0...14)( :a, 0, + (0...1), RescueModifierNode(4...14)( IntegerNode(4...5)(), (6...12), IntegerNode(13...14)() ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt b/test/yarp/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt index c28b8c2178..86469f1c91 100644 --- a/test/yarp/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt +++ b/test/yarp/snapshots/seattlerb/lasgn_call_bracket_rescue_arg.txt @@ -4,6 +4,7 @@ ProgramNode(0...17)( [LocalVariableWriteNode(0...17)( :a, 0, + (0...1), RescueModifierNode(4...17)( CallNode(4...8)( nil, @@ -19,7 +20,6 @@ ProgramNode(0...17)( (9...15), IntegerNode(16...17)() ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt b/test/yarp/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt index bfb7c9b678..72e54e0101 100644 --- a/test/yarp/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt +++ b/test/yarp/snapshots/seattlerb/lasgn_call_nobracket_rescue_arg.txt @@ -4,6 +4,7 @@ ProgramNode(0...16)( [LocalVariableWriteNode(0...16)( :a, 0, + (0...1), CallNode(4...16)( nil, nil, @@ -21,7 +22,6 @@ ProgramNode(0...16)( 0, "b" ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/lasgn_command.txt b/test/yarp/snapshots/seattlerb/lasgn_command.txt index 696be78716..b1912a7c6d 100644 --- a/test/yarp/snapshots/seattlerb/lasgn_command.txt +++ b/test/yarp/snapshots/seattlerb/lasgn_command.txt @@ -4,6 +4,7 @@ ProgramNode(0...9)( [LocalVariableWriteNode(0...9)( :a, 0, + (0...1), CallNode(4...9)( CallNode(4...5)(nil, nil, (4...5), nil, nil, nil, nil, 2, "b"), (5...6), @@ -15,7 +16,6 @@ ProgramNode(0...9)( 0, "c" ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/lasgn_env.txt b/test/yarp/snapshots/seattlerb/lasgn_env.txt index 33f2f4701c..cfd276b1b2 100644 --- a/test/yarp/snapshots/seattlerb/lasgn_env.txt +++ b/test/yarp/snapshots/seattlerb/lasgn_env.txt @@ -4,8 +4,8 @@ ProgramNode(0...6)( [LocalVariableWriteNode(0...6)( :a, 0, - IntegerNode(4...6)(), (0...1), + IntegerNode(4...6)(), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/lasgn_lasgn_command_call.txt b/test/yarp/snapshots/seattlerb/lasgn_lasgn_command_call.txt index 4c272c1680..49f22eeb43 100644 --- a/test/yarp/snapshots/seattlerb/lasgn_lasgn_command_call.txt +++ b/test/yarp/snapshots/seattlerb/lasgn_lasgn_command_call.txt @@ -4,9 +4,11 @@ ProgramNode(0...11)( [LocalVariableWriteNode(0...11)( :a, 0, + (0...1), LocalVariableWriteNode(4...11)( :b, 0, + (4...5), CallNode(8...11)( nil, nil, @@ -18,10 +20,8 @@ ProgramNode(0...11)( 0, "c" ), - (4...5), (6...7) ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/lasgn_middle_splat.txt b/test/yarp/snapshots/seattlerb/lasgn_middle_splat.txt index 623f6dc125..acb6c84467 100644 --- a/test/yarp/snapshots/seattlerb/lasgn_middle_splat.txt +++ b/test/yarp/snapshots/seattlerb/lasgn_middle_splat.txt @@ -4,6 +4,7 @@ ProgramNode(0...12)( [LocalVariableWriteNode(0...12)( :a, 0, + (0...1), ArrayNode(4...12)( [CallNode(4...5)(nil, nil, (4...5), nil, nil, nil, nil, 2, "b"), SplatNode(7...9)( @@ -14,7 +15,6 @@ ProgramNode(0...12)( nil, nil ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt b/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt index 08c8d9ea3f..b8b1ec343d 100644 --- a/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt +++ b/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt @@ -16,8 +16,8 @@ ProgramNode(18...90)( [LocalVariableWriteNode(67...81)( :così, 0, - SymbolNode(75...81)((75...76), (76...81), nil, "però"), (67...72), + SymbolNode(75...81)((75...76), (76...81), nil, "però"), (73...74) )] ), diff --git a/test/yarp/snapshots/seattlerb/parse_line_block.txt b/test/yarp/snapshots/seattlerb/parse_line_block.txt index 51282de977..7ca169a86b 100644 --- a/test/yarp/snapshots/seattlerb/parse_line_block.txt +++ b/test/yarp/snapshots/seattlerb/parse_line_block.txt @@ -4,8 +4,8 @@ ProgramNode(0...10)( [LocalVariableWriteNode(0...6)( :a, 0, - IntegerNode(4...6)(), (0...1), + IntegerNode(4...6)(), (2...3) ), CallNode(7...10)( diff --git a/test/yarp/snapshots/seattlerb/parse_line_heredoc.txt b/test/yarp/snapshots/seattlerb/parse_line_heredoc.txt index 8e41b1648b..955d94e98f 100644 --- a/test/yarp/snapshots/seattlerb/parse_line_heredoc.txt +++ b/test/yarp/snapshots/seattlerb/parse_line_heredoc.txt @@ -4,6 +4,7 @@ ProgramNode(6...88)( [LocalVariableWriteNode(6...31)( :string, 0, + (6...12), CallNode(15...31)( InterpolatedStringNode(15...25)( (15...25), @@ -24,7 +25,6 @@ ProgramNode(6...88)( 0, "strip" ), - (6...12), (13...14) ), CallNode(77...88)( diff --git a/test/yarp/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt b/test/yarp/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt index b3ed88d90e..3d52fcbff0 100644 --- a/test/yarp/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt +++ b/test/yarp/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt @@ -4,6 +4,7 @@ ProgramNode(6...74)( [LocalVariableWriteNode(6...22)( :string, 0, + (6...12), InterpolatedStringNode(15...22)( (15...22), [StringNode(23...48)( @@ -14,7 +15,6 @@ ProgramNode(6...74)( )], (48...57) ), - (6...12), (13...14) ), CallNode(63...74)( diff --git a/test/yarp/snapshots/seattlerb/pct_nl.txt b/test/yarp/snapshots/seattlerb/pct_nl.txt index 8435c33e6a..4cdba9d6d6 100644 --- a/test/yarp/snapshots/seattlerb/pct_nl.txt +++ b/test/yarp/snapshots/seattlerb/pct_nl.txt @@ -4,8 +4,8 @@ ProgramNode(0...7)( [LocalVariableWriteNode(0...7)( :x, 0, - StringNode(4...7)((4...6), (6...6), (6...7), ""), (0...1), + StringNode(4...7)((4...6), (6...6), (6...7), ""), (2...3) )] ) diff --git a/test/yarp/snapshots/seattlerb/safe_call_rhs_newline.txt b/test/yarp/snapshots/seattlerb/safe_call_rhs_newline.txt index 4000ecf59b..7785c7921e 100644 --- a/test/yarp/snapshots/seattlerb/safe_call_rhs_newline.txt +++ b/test/yarp/snapshots/seattlerb/safe_call_rhs_newline.txt @@ -4,6 +4,7 @@ ProgramNode(0...8)( [LocalVariableWriteNode(0...8)( :c, 0, + (0...1), CallNode(4...8)( CallNode(4...5)(nil, nil, (4...5), nil, nil, nil, nil, 2, "a"), (5...7), @@ -15,7 +16,6 @@ ProgramNode(0...8)( 1, "b" ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/ternary_operator.txt b/test/yarp/snapshots/ternary_operator.txt index 6055e2434f..9751d53a31 100644 --- a/test/yarp/snapshots/ternary_operator.txt +++ b/test/yarp/snapshots/ternary_operator.txt @@ -147,8 +147,8 @@ ProgramNode(0...131)( [LocalVariableWriteNode(124...129)( :_a, 0, - IntegerNode(128...129)(), (124...126), + IntegerNode(128...129)(), (127...128) )] ), diff --git a/test/yarp/snapshots/unparser/corpus/literal/assignment.txt b/test/yarp/snapshots/unparser/corpus/literal/assignment.txt index 6fb76babca..7680b90f61 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/assignment.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/assignment.txt @@ -323,6 +323,7 @@ ProgramNode(0...704)( LocalVariableWriteNode(351...367)( :a, 0, + (351...352), ParenthesesNode(355...367)( StatementsNode(356...366)( [MultiWriteNode(356...366)( @@ -337,19 +338,19 @@ ProgramNode(0...704)( (355...356), (366...367) ), - (351...352), (353...354) ), LocalVariableWriteNode(368...373)( :a, 0, - IntegerNode(372...373)(), (368...369), + IntegerNode(372...373)(), (370...371) ), LocalVariableWriteNode(374...385)( :foo, 0, + (374...377), CallNode(380...385)( nil, nil, @@ -361,7 +362,6 @@ ProgramNode(0...704)( 0, "foo" ), - (374...377), (378...379) ), CallNode(386...395)( @@ -538,8 +538,8 @@ ProgramNode(0...704)( LocalVariableWriteNode(507...514)( :x, 0, - StringNode(511...514)((511...513), (513...513), (513...514), ""), (507...508), + StringNode(511...514)((511...513), (513...513), (513...514), ""), (509...510) ), CallNode(515...522)( @@ -615,6 +615,7 @@ ProgramNode(0...704)( LocalVariableWriteNode(562...576)( :x, 0, + (562...563), InterpolatedStringNode(566...576)( (566...576), [StringNode(577...579)(nil, (577...579), nil, " "), @@ -622,7 +623,6 @@ ProgramNode(0...704)( StringNode(582...583)(nil, (582...583), nil, "\n")], (583...591) ), - (562...563), (564...565) ), CallNode(591...605)( diff --git a/test/yarp/snapshots/unparser/corpus/literal/if.txt b/test/yarp/snapshots/unparser/corpus/literal/if.txt index 1bfbe7e26f..77fb5c8c63 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/if.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/if.txt @@ -61,6 +61,7 @@ ProgramNode(0...246)( [LocalVariableWriteNode(113...122)( :foo, 0, + (113...116), CallNode(119...122)( nil, nil, @@ -72,7 +73,6 @@ ProgramNode(0...246)( 2, "bar" ), - (113...116), (117...118) )] ), @@ -95,6 +95,7 @@ ProgramNode(0...246)( [LocalVariableWriteNode(146...155)( :foo, 0, + (146...149), CallNode(152...155)( nil, nil, @@ -106,7 +107,6 @@ ProgramNode(0...246)( 2, "bar" ), - (146...149), (150...151) )] ), @@ -134,6 +134,7 @@ ProgramNode(0...246)( [LocalVariableWriteNode(184...193)( :foo, 0, + (184...187), CallNode(190...193)( nil, nil, @@ -145,7 +146,6 @@ ProgramNode(0...246)( 2, "bar" ), - (184...187), (188...189) )] ), @@ -190,8 +190,8 @@ ProgramNode(0...246)( [LocalVariableWriteNode(225...236)( :pair, 0, - SymbolNode(232...236)((232...233), (233...236), nil, "foo"), (225...229), + SymbolNode(232...236)((232...233), (233...236), nil, "foo"), (230...231) ), LocalVariableReadNode(239...242)(:foo, 0)] diff --git a/test/yarp/snapshots/unparser/corpus/literal/kwbegin.txt b/test/yarp/snapshots/unparser/corpus/literal/kwbegin.txt index 7e9670dae5..1f28ad87b4 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/kwbegin.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/kwbegin.txt @@ -259,6 +259,7 @@ ProgramNode(0...530)( LocalVariableWriteNode(307...316)( :foo, 0, + (307...310), CallNode(313...316)( nil, nil, @@ -270,7 +271,6 @@ ProgramNode(0...530)( 2, "bar" ), - (307...310), (311...312) ) )] diff --git a/test/yarp/snapshots/unparser/corpus/literal/rescue.txt b/test/yarp/snapshots/unparser/corpus/literal/rescue.txt index ed653b5d13..8898a6e1a0 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/rescue.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/rescue.txt @@ -29,6 +29,7 @@ ProgramNode(0...64)( LocalVariableWriteNode(37...64)( :x, 0, + (37...38), ParenthesesNode(41...64)( StatementsNode(42...63)( [RescueModifierNode(42...63)( @@ -65,7 +66,6 @@ ProgramNode(0...64)( (41...42), (63...64) ), - (37...38), (39...40) )] ) diff --git a/test/yarp/snapshots/unparser/corpus/literal/send.txt b/test/yarp/snapshots/unparser/corpus/literal/send.txt index 1d3cd313b7..7ec3a338ce 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/send.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/send.txt @@ -48,8 +48,8 @@ ProgramNode(0...999)( [LocalVariableWriteNode(48...57)( :local, 0, - IntegerNode(56...57)(), (48...53), + IntegerNode(56...57)(), (54...55) ), CallNode(60...69)( diff --git a/test/yarp/snapshots/unparser/corpus/literal/while.txt b/test/yarp/snapshots/unparser/corpus/literal/while.txt index 003c03d614..7fcd66a01e 100644 --- a/test/yarp/snapshots/unparser/corpus/literal/while.txt +++ b/test/yarp/snapshots/unparser/corpus/literal/while.txt @@ -48,8 +48,8 @@ ProgramNode(0...620)( [LocalVariableWriteNode(43...52)( :foo, 0, - LocalVariableReadNode(49...52)(:bar, 0), (43...46), + LocalVariableReadNode(49...52)(:bar, 0), (47...48) )] ), @@ -101,6 +101,7 @@ ProgramNode(0...620)( [LocalVariableWriteNode(80...89)( :foo, 0, + (80...83), CallNode(86...89)( nil, nil, @@ -112,7 +113,6 @@ ProgramNode(0...620)( 2, "bar" ), - (80...83), (84...85) )] ), @@ -140,6 +140,7 @@ ProgramNode(0...620)( [LocalVariableWriteNode(123...132)( :foo, 0, + (123...126), CallNode(129...132)( nil, nil, @@ -151,7 +152,6 @@ ProgramNode(0...620)( 2, "bar" ), - (123...126), (127...128) )] ), @@ -174,6 +174,7 @@ ProgramNode(0...620)( [LocalVariableWriteNode(159...168)( :foo, 0, + (159...162), CallNode(165...168)( nil, nil, @@ -185,7 +186,6 @@ ProgramNode(0...620)( 2, "bar" ), - (159...162), (163...164) )] ), @@ -218,6 +218,7 @@ ProgramNode(0...620)( [LocalVariableWriteNode(209...218)( :foo, 0, + (209...212), CallNode(215...218)( nil, nil, @@ -229,7 +230,6 @@ ProgramNode(0...620)( 2, "bar" ), - (209...212), (213...214) )] ), @@ -286,6 +286,7 @@ ProgramNode(0...620)( [LocalVariableWriteNode(274...283)( :foo, 0, + (274...277), CallNode(280...283)( nil, nil, @@ -297,7 +298,6 @@ ProgramNode(0...620)( 2, "bar" ), - (274...277), (278...279) )] ), @@ -351,6 +351,7 @@ ProgramNode(0...620)( [LocalVariableWriteNode(345...354)( :foo, 0, + (345...348), CallNode(351...354)( nil, nil, @@ -362,7 +363,6 @@ ProgramNode(0...620)( 2, "bar" ), - (345...348), (349...350) )] ), @@ -382,6 +382,7 @@ ProgramNode(0...620)( LocalVariableWriteNode(371...402)( :x, 0, + (371...372), ParenthesesNode(375...402)( StatementsNode(376...401)( [WhileNode(376...401)( @@ -426,7 +427,6 @@ ProgramNode(0...620)( (375...376), (401...402) ), - (371...372), (373...374) ), WhileNode(403...428)( diff --git a/test/yarp/snapshots/unparser/corpus/semantic/while.txt b/test/yarp/snapshots/unparser/corpus/semantic/while.txt index c381369c41..d6d4198447 100644 --- a/test/yarp/snapshots/unparser/corpus/semantic/while.txt +++ b/test/yarp/snapshots/unparser/corpus/semantic/while.txt @@ -47,6 +47,7 @@ ProgramNode(0...188)( [LocalVariableWriteNode(36...45)( :foo, 0, + (36...39), CallNode(42...45)( nil, nil, @@ -58,7 +59,6 @@ ProgramNode(0...188)( 2, "bar" ), - (36...39), (40...41) )] ), @@ -93,8 +93,8 @@ ProgramNode(0...188)( LocalVariableWriteNode(83...88)( :a, 0, - CallNode(87...88)(nil, nil, (87...88), nil, nil, nil, nil, 2, "b"), (83...84), + CallNode(87...88)(nil, nil, (87...88), nil, nil, nil, nil, 2, "b"), (85...86) ), StatementsNode(91...92)([LocalVariableReadNode(91...92)(:a, 0)]), @@ -145,6 +145,7 @@ ProgramNode(0...188)( [LocalVariableWriteNode(143...152)( :foo, 0, + (143...146), CallNode(149...152)( nil, nil, @@ -156,7 +157,6 @@ ProgramNode(0...188)( 2, "exp" ), - (143...146), (147...148) ), WhileNode(155...184)( @@ -167,6 +167,7 @@ ProgramNode(0...188)( [LocalVariableWriteNode(169...178)( :foo, 0, + (169...172), CallNode(175...178)( nil, nil, @@ -178,7 +179,6 @@ ProgramNode(0...188)( 2, "bar" ), - (169...172), (173...174) )] ), diff --git a/test/yarp/snapshots/variables.txt b/test/yarp/snapshots/variables.txt index 11f622ce9b..edd27690a1 100644 --- a/test/yarp/snapshots/variables.txt +++ b/test/yarp/snapshots/variables.txt @@ -43,8 +43,8 @@ ProgramNode(0...293)( LocalVariableWriteNode(85...92)( :abc, 0, - IntegerNode(91...92)(), (85...88), + IntegerNode(91...92)(), (89...90) ), MultiWriteNode(94...108)( @@ -85,30 +85,30 @@ ProgramNode(0...293)( LocalVariableWriteNode(152...159)( :foo, 0, - IntegerNode(158...159)(), (152...155), + IntegerNode(158...159)(), (156...157) ), LocalVariableWriteNode(161...171)( :foo, 0, + (161...164), ArrayNode(167...171)( [IntegerNode(167...168)(), IntegerNode(170...171)()], nil, nil ), - (161...164), (165...166) ), LocalVariableWriteNode(173...183)( :foo, 0, + (173...176), ArrayNode(179...183)( [IntegerNode(179...180)(), IntegerNode(182...183)()], nil, nil ), - (173...176), (177...178) ), MultiWriteNode(185...198)( @@ -177,6 +177,7 @@ ProgramNode(0...293)( LocalVariableWriteNode(260...270)( :foo, 0, + (260...263), ArrayNode(266...270)( [SplatNode(266...270)( (266...267), @@ -185,7 +186,6 @@ ProgramNode(0...293)( nil, nil ), - (260...263), (264...265) ), ConstantWriteNode(272...282)( diff --git a/test/yarp/snapshots/while.txt b/test/yarp/snapshots/while.txt index 667dd30359..4aa5fe85f1 100644 --- a/test/yarp/snapshots/while.txt +++ b/test/yarp/snapshots/while.txt @@ -123,6 +123,7 @@ ProgramNode(0...314)( [LocalVariableWriteNode(179...193)( :a, 0, + (179...180), CallNode(183...193)( nil, nil, @@ -134,7 +135,6 @@ ProgramNode(0...314)( 0, "tap" ), - (179...180), (181...182) )] ), @@ -182,6 +182,7 @@ ProgramNode(0...314)( [LocalVariableWriteNode(283...297)( :a, 0, + (283...284), CallNode(287...297)( nil, nil, @@ -193,7 +194,6 @@ ProgramNode(0...314)( 0, "tap" ), - (283...284), (285...286) )] ), diff --git a/test/yarp/snapshots/whitequark/asgn_cmd.txt b/test/yarp/snapshots/whitequark/asgn_cmd.txt index 218c28dc0f..ef24cc0477 100644 --- a/test/yarp/snapshots/whitequark/asgn_cmd.txt +++ b/test/yarp/snapshots/whitequark/asgn_cmd.txt @@ -4,9 +4,11 @@ ProgramNode(0...30)( [LocalVariableWriteNode(0...17)( :foo, 0, + (0...3), LocalVariableWriteNode(6...17)( :bar, 0, + (6...9), CallNode(12...17)( nil, nil, @@ -18,15 +20,14 @@ ProgramNode(0...30)( 0, "m" ), - (6...9), (10...11) ), - (0...3), (4...5) ), LocalVariableWriteNode(19...30)( :foo, 0, + (19...22), CallNode(25...30)( nil, nil, @@ -38,7 +39,6 @@ ProgramNode(0...30)( 0, "m" ), - (19...22), (23...24) )] ) diff --git a/test/yarp/snapshots/whitequark/asgn_mrhs.txt b/test/yarp/snapshots/whitequark/asgn_mrhs.txt index fddbc439e5..aaf2bedb6f 100644 --- a/test/yarp/snapshots/whitequark/asgn_mrhs.txt +++ b/test/yarp/snapshots/whitequark/asgn_mrhs.txt @@ -4,6 +4,7 @@ ProgramNode(0...41)( [LocalVariableWriteNode(0...10)( :foo, 0, + (0...3), ArrayNode(6...10)( [SplatNode(6...10)( (6...7), @@ -12,24 +13,24 @@ ProgramNode(0...41)( nil, nil ), - (0...3), (4...5) ), LocalVariableWriteNode(12...24)( :foo, 0, + (12...15), ArrayNode(18...24)( [CallNode(18...21)(nil, nil, (18...21), nil, nil, nil, nil, 2, "bar"), IntegerNode(23...24)()], nil, nil ), - (12...15), (16...17) ), LocalVariableWriteNode(26...41)( :foo, 0, + (26...29), ArrayNode(32...41)( [CallNode(32...35)(nil, nil, (32...35), nil, nil, nil, nil, 2, "baz"), SplatNode(37...41)( @@ -49,7 +50,6 @@ ProgramNode(0...41)( nil, nil ), - (26...29), (30...31) )] ) diff --git a/test/yarp/snapshots/whitequark/class_definition_in_while_cond.txt b/test/yarp/snapshots/whitequark/class_definition_in_while_cond.txt index a3108d7060..1e954972a8 100644 --- a/test/yarp/snapshots/whitequark/class_definition_in_while_cond.txt +++ b/test/yarp/snapshots/whitequark/class_definition_in_while_cond.txt @@ -13,6 +13,7 @@ ProgramNode(0...197)( [LocalVariableWriteNode(21...35)( :a, 0, + (21...22), CallNode(25...35)( nil, nil, @@ -24,7 +25,6 @@ ProgramNode(0...197)( 0, "tap" ), - (21...22), (23...24) )] ), @@ -72,6 +72,7 @@ ProgramNode(0...197)( [LocalVariableWriteNode(120...134)( :a, 0, + (120...121), CallNode(124...134)( nil, nil, @@ -83,7 +84,6 @@ ProgramNode(0...197)( 0, "tap" ), - (120...121), (122...123) )] ), diff --git a/test/yarp/snapshots/whitequark/lvasgn.txt b/test/yarp/snapshots/whitequark/lvasgn.txt index 403c7f8042..bb762001ba 100644 --- a/test/yarp/snapshots/whitequark/lvasgn.txt +++ b/test/yarp/snapshots/whitequark/lvasgn.txt @@ -4,8 +4,8 @@ ProgramNode(0...13)( [LocalVariableWriteNode(0...8)( :var, 0, - IntegerNode(6...8)(), (0...3), + IntegerNode(6...8)(), (4...5) ), LocalVariableReadNode(10...13)(:var, 0)] diff --git a/test/yarp/snapshots/whitequark/parser_bug_507.txt b/test/yarp/snapshots/whitequark/parser_bug_507.txt index 4d6d91a763..f305b7daea 100644 --- a/test/yarp/snapshots/whitequark/parser_bug_507.txt +++ b/test/yarp/snapshots/whitequark/parser_bug_507.txt @@ -4,6 +4,7 @@ ProgramNode(0...19)( [LocalVariableWriteNode(0...19)( :m, 0, + (0...1), LambdaNode(4...19)( [:args], (4...6), @@ -25,7 +26,6 @@ ProgramNode(0...19)( ), nil ), - (0...1), (2...3) )] ) diff --git a/test/yarp/snapshots/whitequark/rescue_mod_asgn.txt b/test/yarp/snapshots/whitequark/rescue_mod_asgn.txt index c0c1b20cef..b0ca3f6c95 100644 --- a/test/yarp/snapshots/whitequark/rescue_mod_asgn.txt +++ b/test/yarp/snapshots/whitequark/rescue_mod_asgn.txt @@ -4,12 +4,12 @@ ProgramNode(0...21)( [LocalVariableWriteNode(0...21)( :foo, 0, + (0...3), RescueModifierNode(6...21)( CallNode(6...10)(nil, nil, (6...10), nil, nil, nil, nil, 2, "meth"), (11...17), CallNode(18...21)(nil, nil, (18...21), nil, nil, nil, nil, 2, "bar") ), - (0...3), (4...5) )] ) diff --git a/test/yarp/snapshots/whitequark/ruby_bug_12073.txt b/test/yarp/snapshots/whitequark/ruby_bug_12073.txt index 7614f1b120..8a3aee68a6 100644 --- a/test/yarp/snapshots/whitequark/ruby_bug_12073.txt +++ b/test/yarp/snapshots/whitequark/ruby_bug_12073.txt @@ -4,8 +4,8 @@ ProgramNode(0...49)( [LocalVariableWriteNode(0...5)( :a, 0, - IntegerNode(4...5)(), (0...1), + IntegerNode(4...5)(), (2...3) ), CallNode(7...13)( diff --git a/test/yarp/snapshots/whitequark/ruby_bug_12402.txt b/test/yarp/snapshots/whitequark/ruby_bug_12402.txt index f2980c1d42..7bcef82926 100644 --- a/test/yarp/snapshots/whitequark/ruby_bug_12402.txt +++ b/test/yarp/snapshots/whitequark/ruby_bug_12402.txt @@ -72,6 +72,7 @@ ProgramNode(0...437)( LocalVariableWriteNode(59...85)( :foo, 0, + (59...62), CallNode(65...85)( nil, nil, @@ -99,12 +100,12 @@ ProgramNode(0...437)( 0, "raise" ), - (59...62), (63...64) ), LocalVariableWriteNode(87...114)( :foo, 0, + (87...90), RescueModifierNode(93...114)( CallNode(93...103)( nil, @@ -132,7 +133,6 @@ ProgramNode(0...437)( (104...110), NilNode(111...114)() ), - (87...90), (91...92) ), CallOperatorWriteNode(116...145)( diff --git a/test/yarp/snapshots/whitequark/ruby_bug_12669.txt b/test/yarp/snapshots/whitequark/ruby_bug_12669.txt index f5ec48ce95..689a3d9a77 100644 --- a/test/yarp/snapshots/whitequark/ruby_bug_12669.txt +++ b/test/yarp/snapshots/whitequark/ruby_bug_12669.txt @@ -34,6 +34,7 @@ ProgramNode(0...74)( LocalVariableWriteNode(25...37)( :b, 0, + (25...26), CallNode(29...37)( nil, nil, @@ -47,7 +48,6 @@ ProgramNode(0...74)( 0, "raise" ), - (25...26), (27...28) ), :a, @@ -57,6 +57,7 @@ ProgramNode(0...74)( LocalVariableWriteNode(39...56)( :a, 0, + (39...40), LocalVariableOperatorWriteNode(43...56)( (43...44), (45...47), @@ -77,15 +78,16 @@ ProgramNode(0...74)( :+, 0 ), - (39...40), (41...42) ), LocalVariableWriteNode(58...74)( :a, 0, + (58...59), LocalVariableWriteNode(62...74)( :b, 0, + (62...63), CallNode(66...74)( nil, nil, @@ -99,10 +101,8 @@ ProgramNode(0...74)( 0, "raise" ), - (62...63), (64...65) ), - (58...59), (60...61) )] ) diff --git a/test/yarp/snapshots/whitequark/ruby_bug_9669.txt b/test/yarp/snapshots/whitequark/ruby_bug_9669.txt index 3cdaf91407..6302c3d317 100644 --- a/test/yarp/snapshots/whitequark/ruby_bug_9669.txt +++ b/test/yarp/snapshots/whitequark/ruby_bug_9669.txt @@ -25,6 +25,7 @@ ProgramNode(0...33)( LocalVariableWriteNode(21...33)( :o, 0, + (21...22), HashNode(25...33)( (25...26), [AssocNode(27...31)( @@ -34,7 +35,6 @@ ProgramNode(0...33)( )], (32...33) ), - (21...22), (23...24) )] ) diff --git a/test/yarp/snapshots/whitequark/ternary_ambiguous_symbol.txt b/test/yarp/snapshots/whitequark/ternary_ambiguous_symbol.txt index 245f8a07fe..3f77bfd3e5 100644 --- a/test/yarp/snapshots/whitequark/ternary_ambiguous_symbol.txt +++ b/test/yarp/snapshots/whitequark/ternary_ambiguous_symbol.txt @@ -4,8 +4,8 @@ ProgramNode(0...13)( [LocalVariableWriteNode(0...3)( :t, 0, - IntegerNode(2...3)(), (0...1), + IntegerNode(2...3)(), (1...2) ), IfNode(4...13)( |