From 7d26c03267cf1be643963355fc52efde1574b37a Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Mon, 21 Aug 2023 10:45:56 -0700 Subject: [PATCH] Manually resync YARP YARP commits were synced out of order. We are doing this reset commit to ensure that all files are currently correct and we can proceed with monitoring syncs so this doesn't happen again. --- .../fixtures/newline-terminated-things.txt | 16 -- .../seattlerb/heredoc_wtf_I_hate_you.txt | 4 - .../seattlerb/i_fucking_hate_line_numbers.txt | 13 -- .../i_fucking_hate_line_numbers2.txt | 8 - .../seattlerb/i_have_no_freakin_clue.txt | 2 - test/yarp/fixtures/seattlerb/kill_me.txt | 1 - test/yarp/fixtures/seattlerb/kill_me2.txt | 1 - test/yarp/fixtures/seattlerb/kill_me3.txt | 1 - test/yarp/fixtures/seattlerb/kill_me4.txt | 1 - test/yarp/fixtures/seattlerb/kill_me5.txt | 1 - test/yarp/fixtures/seattlerb/kill_me_10.txt | 1 - test/yarp/fixtures/seattlerb/kill_me_11.txt | 1 - test/yarp/fixtures/seattlerb/kill_me_12.txt | 1 - test/yarp/fixtures/seattlerb/kill_me_6.txt | 1 - test/yarp/fixtures/seattlerb/kill_me_7.txt | 1 - test/yarp/fixtures/seattlerb/kill_me_8.txt | 1 - test/yarp/fixtures/seattlerb/kill_me_9.txt | 1 - .../seattlerb/motherfuckin_leading_dots.txt | 2 - .../seattlerb/motherfuckin_leading_dots2.txt | 2 - test/yarp/fixtures/seattlerb/wtf.txt | 1 - test/yarp/fixtures/seattlerb/wtf_7.txt | 1 - test/yarp/fixtures/seattlerb/wtf_8.txt | 1 - .../zomg_sometimes_i_hate_this_project.txt | 5 - test/yarp/location_test.rb | 41 ----- .../snapshots/newline-terminated-things.txt | 22 --- .../seattlerb/heredoc_wtf_I_hate_you.txt | 51 ------ .../seattlerb/i_fucking_hate_line_numbers.txt | 131 -------------- .../i_fucking_hate_line_numbers2.txt | 52 ------ .../seattlerb/i_have_no_freakin_clue.txt | 49 ------ test/yarp/snapshots/seattlerb/kill_me.txt | 44 ----- test/yarp/snapshots/seattlerb/kill_me2.txt | 35 ---- test/yarp/snapshots/seattlerb/kill_me3.txt | 35 ---- test/yarp/snapshots/seattlerb/kill_me4.txt | 22 --- test/yarp/snapshots/seattlerb/kill_me5.txt | 35 ---- test/yarp/snapshots/seattlerb/kill_me_10.txt | 44 ----- test/yarp/snapshots/seattlerb/kill_me_11.txt | 40 ----- test/yarp/snapshots/seattlerb/kill_me_12.txt | 41 ----- test/yarp/snapshots/seattlerb/kill_me_6.txt | 45 ----- test/yarp/snapshots/seattlerb/kill_me_7.txt | 41 ----- test/yarp/snapshots/seattlerb/kill_me_8.txt | 42 ----- test/yarp/snapshots/seattlerb/kill_me_9.txt | 43 ----- .../seattlerb/motherfuckin_leading_dots.txt | 16 -- .../seattlerb/motherfuckin_leading_dots2.txt | 7 - test/yarp/snapshots/seattlerb/wtf.txt | 48 ----- test/yarp/snapshots/seattlerb/wtf_7.txt | 30 ---- test/yarp/snapshots/seattlerb/wtf_8.txt | 30 ---- .../zomg_sometimes_i_hate_this_project.txt | 81 --------- yarp/config.yml | 112 ------------ yarp/yarp.c | 166 ------------------ 49 files changed, 1370 deletions(-) delete mode 100644 test/yarp/fixtures/newline-terminated-things.txt delete mode 100644 test/yarp/fixtures/seattlerb/heredoc_wtf_I_hate_you.txt delete mode 100644 test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers.txt delete mode 100644 test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers2.txt delete mode 100644 test/yarp/fixtures/seattlerb/i_have_no_freakin_clue.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me2.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me3.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me4.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me5.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me_10.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me_11.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me_12.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me_6.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me_7.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me_8.txt delete mode 100644 test/yarp/fixtures/seattlerb/kill_me_9.txt delete mode 100644 test/yarp/fixtures/seattlerb/motherfuckin_leading_dots.txt delete mode 100644 test/yarp/fixtures/seattlerb/motherfuckin_leading_dots2.txt delete mode 100644 test/yarp/fixtures/seattlerb/wtf.txt delete mode 100644 test/yarp/fixtures/seattlerb/wtf_7.txt delete mode 100644 test/yarp/fixtures/seattlerb/wtf_8.txt delete mode 100644 test/yarp/fixtures/seattlerb/zomg_sometimes_i_hate_this_project.txt delete mode 100644 test/yarp/snapshots/newline-terminated-things.txt delete mode 100644 test/yarp/snapshots/seattlerb/heredoc_wtf_I_hate_you.txt delete mode 100644 test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers.txt delete mode 100644 test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers2.txt delete mode 100644 test/yarp/snapshots/seattlerb/i_have_no_freakin_clue.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me2.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me3.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me4.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me5.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me_10.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me_11.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me_12.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me_6.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me_7.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me_8.txt delete mode 100644 test/yarp/snapshots/seattlerb/kill_me_9.txt delete mode 100644 test/yarp/snapshots/seattlerb/motherfuckin_leading_dots.txt delete mode 100644 test/yarp/snapshots/seattlerb/motherfuckin_leading_dots2.txt delete mode 100644 test/yarp/snapshots/seattlerb/wtf.txt delete mode 100644 test/yarp/snapshots/seattlerb/wtf_7.txt delete mode 100644 test/yarp/snapshots/seattlerb/wtf_8.txt delete mode 100644 test/yarp/snapshots/seattlerb/zomg_sometimes_i_hate_this_project.txt diff --git a/test/yarp/fixtures/newline-terminated-things.txt b/test/yarp/fixtures/newline-terminated-things.txt deleted file mode 100644 index ba07c085b0..0000000000 --- a/test/yarp/fixtures/newline-terminated-things.txt +++ /dev/null @@ -1,16 +0,0 @@ -<<<<<<< HEAD:test/yarp/fixtures/newline-terminated-things.txt -# note that %i, %I, %w, and %W do not support newline termination in CRuby - -% -foo - -%q -foo - -%Q -foo - -======= ->>>>>>> 0d5d759091 (fix: support newline-terminated regular expressions):test/fixtures/newline-terminated-things.txt -%r -foo diff --git a/test/yarp/fixtures/seattlerb/heredoc_wtf_I_hate_you.txt b/test/yarp/fixtures/seattlerb/heredoc_wtf_I_hate_you.txt deleted file mode 100644 index 5c73907cae..0000000000 --- a/test/yarp/fixtures/seattlerb/heredoc_wtf_I_hate_you.txt +++ /dev/null @@ -1,4 +0,0 @@ -p <<-END+'b - a - END - c'+'d' diff --git a/test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers.txt b/test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers.txt deleted file mode 100644 index 8008127dc9..0000000000 --- a/test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers.txt +++ /dev/null @@ -1,13 +0,0 @@ -if true - p 1 - a.b 2 - c.d 3, 4 - e.f 5 - g.h 6, 7 - p(1) - a.b(2) - c.d(3, 4) - e.f(5) - g.h(6, 7) -end - diff --git a/test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers2.txt b/test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers2.txt deleted file mode 100644 index 1964562416..0000000000 --- a/test/yarp/fixtures/seattlerb/i_fucking_hate_line_numbers2.txt +++ /dev/null @@ -1,8 +0,0 @@ -if true then - p("a") - b = 1 - p b - c =1 -end -a - diff --git a/test/yarp/fixtures/seattlerb/i_have_no_freakin_clue.txt b/test/yarp/fixtures/seattlerb/i_have_no_freakin_clue.txt deleted file mode 100644 index 3259097492..0000000000 --- a/test/yarp/fixtures/seattlerb/i_have_no_freakin_clue.txt +++ /dev/null @@ -1,2 +0,0 @@ -1 ? b('') : 2 -a d: 3 diff --git a/test/yarp/fixtures/seattlerb/kill_me.txt b/test/yarp/fixtures/seattlerb/kill_me.txt deleted file mode 100644 index 9f95860b82..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (b, *c)| } diff --git a/test/yarp/fixtures/seattlerb/kill_me2.txt b/test/yarp/fixtures/seattlerb/kill_me2.txt deleted file mode 100644 index 8abfe3f634..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me2.txt +++ /dev/null @@ -1 +0,0 @@ -f { |*a, b| } diff --git a/test/yarp/fixtures/seattlerb/kill_me3.txt b/test/yarp/fixtures/seattlerb/kill_me3.txt deleted file mode 100644 index 6f43ab7b1d..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me3.txt +++ /dev/null @@ -1 +0,0 @@ -f { |*a, b, &c| } diff --git a/test/yarp/fixtures/seattlerb/kill_me4.txt b/test/yarp/fixtures/seattlerb/kill_me4.txt deleted file mode 100644 index 7070e1e964..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me4.txt +++ /dev/null @@ -1 +0,0 @@ -a=b ? true: false diff --git a/test/yarp/fixtures/seattlerb/kill_me5.txt b/test/yarp/fixtures/seattlerb/kill_me5.txt deleted file mode 100644 index 6d52692481..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me5.txt +++ /dev/null @@ -1 +0,0 @@ -f ->() { g do end } diff --git a/test/yarp/fixtures/seattlerb/kill_me_10.txt b/test/yarp/fixtures/seattlerb/kill_me_10.txt deleted file mode 100644 index 89974f5114..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me_10.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (*b, c)| } diff --git a/test/yarp/fixtures/seattlerb/kill_me_11.txt b/test/yarp/fixtures/seattlerb/kill_me_11.txt deleted file mode 100644 index 911d037961..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me_11.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (*)| } diff --git a/test/yarp/fixtures/seattlerb/kill_me_12.txt b/test/yarp/fixtures/seattlerb/kill_me_12.txt deleted file mode 100644 index 2405a80ec1..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me_12.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (*, b)| } diff --git a/test/yarp/fixtures/seattlerb/kill_me_6.txt b/test/yarp/fixtures/seattlerb/kill_me_6.txt deleted file mode 100644 index 3a45ae86fb..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me_6.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (b, *c, d)| } diff --git a/test/yarp/fixtures/seattlerb/kill_me_7.txt b/test/yarp/fixtures/seattlerb/kill_me_7.txt deleted file mode 100644 index 55272a1fc4..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me_7.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (b, *)| } diff --git a/test/yarp/fixtures/seattlerb/kill_me_8.txt b/test/yarp/fixtures/seattlerb/kill_me_8.txt deleted file mode 100644 index 76740db4ff..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me_8.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (b, *, c)| } diff --git a/test/yarp/fixtures/seattlerb/kill_me_9.txt b/test/yarp/fixtures/seattlerb/kill_me_9.txt deleted file mode 100644 index b65f7fd052..0000000000 --- a/test/yarp/fixtures/seattlerb/kill_me_9.txt +++ /dev/null @@ -1 +0,0 @@ -f { |a, (*b)| } diff --git a/test/yarp/fixtures/seattlerb/motherfuckin_leading_dots.txt b/test/yarp/fixtures/seattlerb/motherfuckin_leading_dots.txt deleted file mode 100644 index 332dc8225c..0000000000 --- a/test/yarp/fixtures/seattlerb/motherfuckin_leading_dots.txt +++ /dev/null @@ -1,2 +0,0 @@ -a -.b diff --git a/test/yarp/fixtures/seattlerb/motherfuckin_leading_dots2.txt b/test/yarp/fixtures/seattlerb/motherfuckin_leading_dots2.txt deleted file mode 100644 index fe73f641fe..0000000000 --- a/test/yarp/fixtures/seattlerb/motherfuckin_leading_dots2.txt +++ /dev/null @@ -1,2 +0,0 @@ -1 -..3 diff --git a/test/yarp/fixtures/seattlerb/wtf.txt b/test/yarp/fixtures/seattlerb/wtf.txt deleted file mode 100644 index 7396a9a76f..0000000000 --- a/test/yarp/fixtures/seattlerb/wtf.txt +++ /dev/null @@ -1 +0,0 @@ -->(a, b=nil) { p [a, b] } diff --git a/test/yarp/fixtures/seattlerb/wtf_7.txt b/test/yarp/fixtures/seattlerb/wtf_7.txt deleted file mode 100644 index 048358bbdc..0000000000 --- a/test/yarp/fixtures/seattlerb/wtf_7.txt +++ /dev/null @@ -1 +0,0 @@ -a.b (1) {c} diff --git a/test/yarp/fixtures/seattlerb/wtf_8.txt b/test/yarp/fixtures/seattlerb/wtf_8.txt deleted file mode 100644 index ba1cbc235d..0000000000 --- a/test/yarp/fixtures/seattlerb/wtf_8.txt +++ /dev/null @@ -1 +0,0 @@ -a::b (1) {c} diff --git a/test/yarp/fixtures/seattlerb/zomg_sometimes_i_hate_this_project.txt b/test/yarp/fixtures/seattlerb/zomg_sometimes_i_hate_this_project.txt deleted file mode 100644 index 112b75c5f2..0000000000 --- a/test/yarp/fixtures/seattlerb/zomg_sometimes_i_hate_this_project.txt +++ /dev/null @@ -1,5 +0,0 @@ - { - a: lambda { b ? c() : d }, - e: nil, - } - diff --git a/test/yarp/location_test.rb b/test/yarp/location_test.rb index 3902b2036c..703c8e24f0 100644 --- a/test/yarp/location_test.rb +++ b/test/yarp/location_test.rb @@ -209,13 +209,6 @@ module YARP assert_location(ClassNode, "class Foo < Bar end") end -<<<<<<< HEAD:test/yarp/location_test.rb -======= - def test_ClassVariableOperatorWriteNode - assert_location(ClassVariableOperatorWriteNode, "@@foo += bar") - end - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb def test_ClassVariableReadNode assert_location(ClassVariableReadNode, "@@foo") end @@ -236,17 +229,6 @@ module YARP assert_location(ConstantPathWriteNode, "::Foo::Bar = baz") end -<<<<<<< HEAD:test/yarp/location_test.rb -======= - def test_ConstantPathOperatorWriteNode - assert_location(ConstantPathOperatorWriteNode, "Parent::Child += bar") - end - - def test_ConstantOperatorWriteNode - assert_location(ConstantOperatorWriteNode, "Foo += bar") - end - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb def test_ConstantReadNode assert_location(ConstantReadNode, "Foo") assert_location(ConstantReadNode, "Foo::Bar", 5...8, &:child) @@ -320,13 +302,6 @@ module YARP assert_location(ForwardingSuperNode, "super {}") end -<<<<<<< HEAD:test/yarp/location_test.rb -======= - def test_GlobalVariableOperatorWriteNode - assert_location(GlobalVariableOperatorWriteNode, "$foo += bar") - end - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb def test_GlobalVariableReadNode assert_location(GlobalVariableReadNode, "$foo") end @@ -361,13 +336,6 @@ module YARP end end -<<<<<<< HEAD:test/yarp/location_test.rb -======= - def test_InstanceVariableOperatorWriteNode - assert_location(InstanceVariableOperatorWriteNode, "@foo += bar") - end - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb def test_InstanceVariableReadNode assert_location(InstanceVariableReadNode, "@foo") end @@ -434,15 +402,6 @@ module YARP assert_location(LambdaNode, "-> do foo end") end -<<<<<<< HEAD:test/yarp/location_test.rb -======= - def test_LocalVariableOperatorWriteNode - assert_location(LocalVariableOperatorWriteNode, "foo += bar") - assert_location(LocalVariableOperatorWriteNode, "foo = 1; foo += bar", 9...19) - end - - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb def test_LocalVariableReadNode assert_location(LocalVariableReadNode, "foo = 1; foo", 9...12) end diff --git a/test/yarp/snapshots/newline-terminated-things.txt b/test/yarp/snapshots/newline-terminated-things.txt deleted file mode 100644 index d01bd6a65a..0000000000 --- a/test/yarp/snapshots/newline-terminated-things.txt +++ /dev/null @@ -1,22 +0,0 @@ -<<<<<<< HEAD:test/yarp/snapshots/newline-terminated-things.txt -ProgramNode(76...106)( - [], - StatementsNode(76...106)( - [StringNode(76...82)((76...78), (78...81), (81...82), "foo"), - StringNode(83...90)((83...86), (86...89), (89...90), "foo"), - StringNode(91...98)((91...94), (94...97), (97...98), "foo"), - RegularExpressionNode(99...106)( - (99...102), - (102...105), - (105...106), - "foo", - 0 - )] -======= -ProgramNode(0...7)( - [], - StatementsNode(0...7)( - [RegularExpressionNode(0...7)((0...3), (3...6), (6...7), "foo", 0)] ->>>>>>> 0d5d759091 (fix: support newline-terminated regular expressions):test/snapshots/newline-terminated-things.txt - ) -) diff --git a/test/yarp/snapshots/seattlerb/heredoc_wtf_I_hate_you.txt b/test/yarp/snapshots/seattlerb/heredoc_wtf_I_hate_you.txt deleted file mode 100644 index c68a126eb0..0000000000 --- a/test/yarp/snapshots/seattlerb/heredoc_wtf_I_hate_you.txt +++ /dev/null @@ -1,51 +0,0 @@ -ProgramNode(0...30)( - [], - StatementsNode(0...30)( - [CallNode(0...30)( - nil, - nil, - (0...1), - nil, - ArgumentsNode(2...30)( - [CallNode(2...30)( - CallNode(2...26)( - InterpolatedStringNode(2...8)( - (2...8), - [StringNode(12...16)(nil, (12...16), nil, " a\n")], - (16...22) - ), - nil, - (8...9), - nil, - ArgumentsNode(9...26)( - [InterpolatedStringNode(9...26)( - (9...10), - [StringNode(10...12)(nil, (10...12), nil, "b\n"), - StringNode(22...25)(nil, (22...25), nil, " c")], - (25...26) - )] - ), - nil, - nil, - 0, - "+" - ), - nil, - (26...27), - nil, - ArgumentsNode(27...30)( - [StringNode(27...30)((27...28), (28...29), (29...30), "d")] - ), - nil, - nil, - 0, - "+" - )] - ), - nil, - nil, - 0, - "p" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers.txt b/test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers.txt deleted file mode 100644 index 6973697641..0000000000 --- a/test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers.txt +++ /dev/null @@ -1,131 +0,0 @@ -ProgramNode(0...104)( - [], - StatementsNode(0...104)( - [IfNode(0...104)( - (0...2), - TrueNode(3...7)(), - StatementsNode(10...100)( - [CallNode(10...13)( - nil, - nil, - (10...11), - nil, - ArgumentsNode(12...13)([IntegerNode(12...13)()]), - nil, - nil, - 0, - "p" - ), - CallNode(16...21)( - CallNode(16...17)(nil, nil, (16...17), nil, nil, nil, nil, 2, "a"), - (17...18), - (18...19), - nil, - ArgumentsNode(20...21)([IntegerNode(20...21)()]), - nil, - nil, - 0, - "b" - ), - CallNode(24...32)( - CallNode(24...25)(nil, nil, (24...25), nil, nil, nil, nil, 2, "c"), - (25...26), - (26...27), - nil, - ArgumentsNode(28...32)( - [IntegerNode(28...29)(), IntegerNode(31...32)()] - ), - nil, - nil, - 0, - "d" - ), - CallNode(35...40)( - CallNode(35...36)(nil, nil, (35...36), nil, nil, nil, nil, 2, "e"), - (36...37), - (37...38), - nil, - ArgumentsNode(39...40)([IntegerNode(39...40)()]), - nil, - nil, - 0, - "f" - ), - CallNode(43...51)( - CallNode(43...44)(nil, nil, (43...44), nil, nil, nil, nil, 2, "g"), - (44...45), - (45...46), - nil, - ArgumentsNode(47...51)( - [IntegerNode(47...48)(), IntegerNode(50...51)()] - ), - nil, - nil, - 0, - "h" - ), - CallNode(54...58)( - nil, - nil, - (54...55), - (55...56), - ArgumentsNode(56...57)([IntegerNode(56...57)()]), - (57...58), - nil, - 0, - "p" - ), - CallNode(61...67)( - CallNode(61...62)(nil, nil, (61...62), nil, nil, nil, nil, 2, "a"), - (62...63), - (63...64), - (64...65), - ArgumentsNode(65...66)([IntegerNode(65...66)()]), - (66...67), - nil, - 0, - "b" - ), - CallNode(70...79)( - CallNode(70...71)(nil, nil, (70...71), nil, nil, nil, nil, 2, "c"), - (71...72), - (72...73), - (73...74), - ArgumentsNode(74...78)( - [IntegerNode(74...75)(), IntegerNode(77...78)()] - ), - (78...79), - nil, - 0, - "d" - ), - CallNode(82...88)( - CallNode(82...83)(nil, nil, (82...83), nil, nil, nil, nil, 2, "e"), - (83...84), - (84...85), - (85...86), - ArgumentsNode(86...87)([IntegerNode(86...87)()]), - (87...88), - nil, - 0, - "f" - ), - CallNode(91...100)( - CallNode(91...92)(nil, nil, (91...92), nil, nil, nil, nil, 2, "g"), - (92...93), - (93...94), - (94...95), - ArgumentsNode(95...99)( - [IntegerNode(95...96)(), IntegerNode(98...99)()] - ), - (99...100), - nil, - 0, - "h" - )] - ), - nil, - (101...104) - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers2.txt b/test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers2.txt deleted file mode 100644 index 86433437ce..0000000000 --- a/test/yarp/snapshots/seattlerb/i_fucking_hate_line_numbers2.txt +++ /dev/null @@ -1,52 +0,0 @@ -ProgramNode(0...48)( - [:b, :c], - StatementsNode(0...48)( - [IfNode(0...46)( - (0...2), - TrueNode(3...7)(), - StatementsNode(15...42)( - [CallNode(15...21)( - nil, - nil, - (15...16), - (16...17), - ArgumentsNode(17...20)( - [StringNode(17...20)((17...18), (18...19), (19...20), "a")] - ), - (20...21), - nil, - 0, - "p" - ), - LocalVariableWriteNode(24...29)( - :b, - 0, - IntegerNode(28...29)(), - (24...25), - (26...27) - ), - CallNode(32...35)( - nil, - nil, - (32...33), - nil, - ArgumentsNode(34...35)([LocalVariableReadNode(34...35)(:b, 0)]), - nil, - nil, - 0, - "p" - ), - LocalVariableWriteNode(38...42)( - :c, - 0, - IntegerNode(41...42)(), - (38...39), - (40...41) - )] - ), - nil, - (43...46) - ), - CallNode(47...48)(nil, nil, (47...48), nil, nil, nil, nil, 2, "a")] - ) -) diff --git a/test/yarp/snapshots/seattlerb/i_have_no_freakin_clue.txt b/test/yarp/snapshots/seattlerb/i_have_no_freakin_clue.txt deleted file mode 100644 index 78772ca20d..0000000000 --- a/test/yarp/snapshots/seattlerb/i_have_no_freakin_clue.txt +++ /dev/null @@ -1,49 +0,0 @@ -ProgramNode(0...20)( - [], - StatementsNode(0...20)( - [IfNode(0...13)( - nil, - IntegerNode(0...1)(), - StatementsNode(4...9)( - [CallNode(4...9)( - nil, - nil, - (4...5), - (5...6), - ArgumentsNode(6...8)( - [StringNode(6...8)((6...7), (7...7), (7...8), "")] - ), - (8...9), - nil, - 0, - "b" - )] - ), - ElseNode(10...13)( - (10...11), - StatementsNode(12...13)([IntegerNode(12...13)()]), - nil - ), - nil - ), - CallNode(14...20)( - nil, - nil, - (14...15), - nil, - ArgumentsNode(16...20)( - [KeywordHashNode(16...20)( - [AssocNode(16...20)( - SymbolNode(16...18)(nil, (16...17), (17...18), "d"), - IntegerNode(19...20)(), - nil - )] - )] - ), - nil, - nil, - 0, - "a" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me.txt b/test/yarp/snapshots/seattlerb/kill_me.txt deleted file mode 100644 index ba5d6c3aed..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me.txt +++ /dev/null @@ -1,44 +0,0 @@ -ProgramNode(0...18)( - [], - StatementsNode(0...18)( - [CallNode(0...18)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...18)( - [:a, :b, :c], - BlockParametersNode(4...16)( - ParametersNode(5...15)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...15)( - [RequiredParameterNode(9...10)(:b), - SplatNode(12...14)( - (12...13), - RequiredParameterNode(13...14)(:c) - )], - (8...9), - (14...15) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (15...16) - ), - nil, - (2...3), - (17...18) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me2.txt b/test/yarp/snapshots/seattlerb/kill_me2.txt deleted file mode 100644 index 3981937066..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me2.txt +++ /dev/null @@ -1,35 +0,0 @@ -ProgramNode(0...13)( - [], - StatementsNode(0...13)( - [CallNode(0...13)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...13)( - [:a, :b], - BlockParametersNode(4...11)( - ParametersNode(5...10)( - [], - [], - [RequiredParameterNode(9...10)(:b)], - RestParameterNode(5...7)((5...6), (6...7)), - [], - nil, - nil - ), - [], - (4...5), - (10...11) - ), - nil, - (2...3), - (12...13) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me3.txt b/test/yarp/snapshots/seattlerb/kill_me3.txt deleted file mode 100644 index 7a25bc9c8b..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me3.txt +++ /dev/null @@ -1,35 +0,0 @@ -ProgramNode(0...17)( - [], - StatementsNode(0...17)( - [CallNode(0...17)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...17)( - [:a, :b, :c], - BlockParametersNode(4...15)( - ParametersNode(5...14)( - [], - [], - [RequiredParameterNode(9...10)(:b)], - RestParameterNode(5...7)((5...6), (6...7)), - [], - nil, - BlockParameterNode(12...14)((13...14), (12...13)) - ), - [], - (4...5), - (14...15) - ), - nil, - (2...3), - (16...17) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me4.txt b/test/yarp/snapshots/seattlerb/kill_me4.txt deleted file mode 100644 index afca77c5fa..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me4.txt +++ /dev/null @@ -1,22 +0,0 @@ -ProgramNode(0...17)( - [:a], - StatementsNode(0...17)( - [LocalVariableWriteNode(0...17)( - :a, - 0, - IfNode(2...17)( - nil, - CallNode(2...3)(nil, nil, (2...3), nil, nil, nil, nil, 2, "b"), - StatementsNode(6...10)([TrueNode(6...10)()]), - ElseNode(10...17)( - (10...11), - StatementsNode(12...17)([FalseNode(12...17)()]), - nil - ), - nil - ), - (0...1), - (1...2) - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me5.txt b/test/yarp/snapshots/seattlerb/kill_me5.txt deleted file mode 100644 index e7aaafc87a..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me5.txt +++ /dev/null @@ -1,35 +0,0 @@ -ProgramNode(0...19)( - [], - StatementsNode(0...19)( - [CallNode(0...19)( - nil, - nil, - (0...1), - nil, - ArgumentsNode(2...19)( - [LambdaNode(2...19)( - [], - (2...4), - BlockParametersNode(4...6)(nil, [], (4...5), (5...6)), - StatementsNode(9...17)( - [CallNode(9...17)( - nil, - nil, - (9...10), - nil, - nil, - nil, - BlockNode(11...17)([], nil, nil, (11...13), (14...17)), - 0, - "g" - )] - ) - )] - ), - nil, - nil, - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me_10.txt b/test/yarp/snapshots/seattlerb/kill_me_10.txt deleted file mode 100644 index 7b7dc6f41b..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me_10.txt +++ /dev/null @@ -1,44 +0,0 @@ -ProgramNode(0...18)( - [], - StatementsNode(0...18)( - [CallNode(0...18)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...18)( - [:a, :b, :c], - BlockParametersNode(4...16)( - ParametersNode(5...15)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...15)( - [SplatNode(9...11)( - (9...10), - RequiredParameterNode(10...11)(:b) - ), - RequiredParameterNode(13...14)(:c)], - (8...9), - (14...15) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (15...16) - ), - nil, - (2...3), - (17...18) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me_11.txt b/test/yarp/snapshots/seattlerb/kill_me_11.txt deleted file mode 100644 index c5b8b81b18..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me_11.txt +++ /dev/null @@ -1,40 +0,0 @@ -ProgramNode(0...14)( - [], - StatementsNode(0...14)( - [CallNode(0...14)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...14)( - [:a], - BlockParametersNode(4...12)( - ParametersNode(5...11)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...11)( - [SplatNode(9...10)((9...10), nil)], - (8...9), - (10...11) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (11...12) - ), - nil, - (2...3), - (13...14) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me_12.txt b/test/yarp/snapshots/seattlerb/kill_me_12.txt deleted file mode 100644 index 87dd280a9e..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me_12.txt +++ /dev/null @@ -1,41 +0,0 @@ -ProgramNode(0...17)( - [], - StatementsNode(0...17)( - [CallNode(0...17)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...17)( - [:a, :b], - BlockParametersNode(4...15)( - ParametersNode(5...14)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...14)( - [SplatNode(9...10)((9...10), nil), - RequiredParameterNode(12...13)(:b)], - (8...9), - (13...14) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (14...15) - ), - nil, - (2...3), - (16...17) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me_6.txt b/test/yarp/snapshots/seattlerb/kill_me_6.txt deleted file mode 100644 index 578a22e843..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me_6.txt +++ /dev/null @@ -1,45 +0,0 @@ -ProgramNode(0...21)( - [], - StatementsNode(0...21)( - [CallNode(0...21)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...21)( - [:a, :b, :c, :d], - BlockParametersNode(4...19)( - ParametersNode(5...18)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...18)( - [RequiredParameterNode(9...10)(:b), - SplatNode(12...14)( - (12...13), - RequiredParameterNode(13...14)(:c) - ), - RequiredParameterNode(16...17)(:d)], - (8...9), - (17...18) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (18...19) - ), - nil, - (2...3), - (20...21) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me_7.txt b/test/yarp/snapshots/seattlerb/kill_me_7.txt deleted file mode 100644 index a306b1f895..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me_7.txt +++ /dev/null @@ -1,41 +0,0 @@ -ProgramNode(0...17)( - [], - StatementsNode(0...17)( - [CallNode(0...17)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...17)( - [:a, :b], - BlockParametersNode(4...15)( - ParametersNode(5...14)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...14)( - [RequiredParameterNode(9...10)(:b), - SplatNode(12...13)((12...13), nil)], - (8...9), - (13...14) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (14...15) - ), - nil, - (2...3), - (16...17) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me_8.txt b/test/yarp/snapshots/seattlerb/kill_me_8.txt deleted file mode 100644 index 9d0eb81357..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me_8.txt +++ /dev/null @@ -1,42 +0,0 @@ -ProgramNode(0...20)( - [], - StatementsNode(0...20)( - [CallNode(0...20)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...20)( - [:a, :b, :c], - BlockParametersNode(4...18)( - ParametersNode(5...17)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...17)( - [RequiredParameterNode(9...10)(:b), - SplatNode(12...13)((12...13), nil), - RequiredParameterNode(15...16)(:c)], - (8...9), - (16...17) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (17...18) - ), - nil, - (2...3), - (19...20) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/kill_me_9.txt b/test/yarp/snapshots/seattlerb/kill_me_9.txt deleted file mode 100644 index a3a5ccd89d..0000000000 --- a/test/yarp/snapshots/seattlerb/kill_me_9.txt +++ /dev/null @@ -1,43 +0,0 @@ -ProgramNode(0...15)( - [], - StatementsNode(0...15)( - [CallNode(0...15)( - nil, - nil, - (0...1), - nil, - nil, - nil, - BlockNode(2...15)( - [:a, :b], - BlockParametersNode(4...13)( - ParametersNode(5...12)( - [RequiredParameterNode(5...6)(:a), - RequiredDestructuredParameterNode(8...12)( - [SplatNode(9...11)( - (9...10), - RequiredParameterNode(10...11)(:b) - )], - (8...9), - (11...12) - )], - [], - [], - nil, - [], - nil, - nil - ), - [], - (4...5), - (12...13) - ), - nil, - (2...3), - (14...15) - ), - 0, - "f" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/motherfuckin_leading_dots.txt b/test/yarp/snapshots/seattlerb/motherfuckin_leading_dots.txt deleted file mode 100644 index 881cc6d5a8..0000000000 --- a/test/yarp/snapshots/seattlerb/motherfuckin_leading_dots.txt +++ /dev/null @@ -1,16 +0,0 @@ -ProgramNode(0...4)( - [], - StatementsNode(0...4)( - [CallNode(0...4)( - CallNode(0...1)(nil, nil, (0...1), nil, nil, nil, nil, 2, "a"), - (2...3), - (3...4), - nil, - nil, - nil, - nil, - 0, - "b" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/motherfuckin_leading_dots2.txt b/test/yarp/snapshots/seattlerb/motherfuckin_leading_dots2.txt deleted file mode 100644 index 8a246f5827..0000000000 --- a/test/yarp/snapshots/seattlerb/motherfuckin_leading_dots2.txt +++ /dev/null @@ -1,7 +0,0 @@ -ProgramNode(0...5)( - [], - StatementsNode(0...5)( - [IntegerNode(0...1)(), - RangeNode(2...5)(nil, IntegerNode(4...5)(), (2...4), 0)] - ) -) diff --git a/test/yarp/snapshots/seattlerb/wtf.txt b/test/yarp/snapshots/seattlerb/wtf.txt deleted file mode 100644 index 20e419bbc4..0000000000 --- a/test/yarp/snapshots/seattlerb/wtf.txt +++ /dev/null @@ -1,48 +0,0 @@ -ProgramNode(0...25)( - [], - StatementsNode(0...25)( - [LambdaNode(0...25)( - [:a, :b], - (0...2), - BlockParametersNode(2...12)( - ParametersNode(3...11)( - [RequiredParameterNode(3...4)(:a)], - [OptionalParameterNode(6...11)( - :b, - (6...7), - (7...8), - NilNode(8...11)() - )], - [], - nil, - [], - nil, - nil - ), - [], - (2...3), - (11...12) - ), - StatementsNode(15...23)( - [CallNode(15...23)( - nil, - nil, - (15...16), - nil, - ArgumentsNode(17...23)( - [ArrayNode(17...23)( - [LocalVariableReadNode(18...19)(:a, 0), - LocalVariableReadNode(21...22)(:b, 0)], - (17...18), - (22...23) - )] - ), - nil, - nil, - 0, - "p" - )] - ) - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/wtf_7.txt b/test/yarp/snapshots/seattlerb/wtf_7.txt deleted file mode 100644 index 60b902f4d2..0000000000 --- a/test/yarp/snapshots/seattlerb/wtf_7.txt +++ /dev/null @@ -1,30 +0,0 @@ -ProgramNode(0...11)( - [], - StatementsNode(0...11)( - [CallNode(0...11)( - CallNode(0...1)(nil, nil, (0...1), nil, nil, nil, nil, 2, "a"), - (1...2), - (2...3), - nil, - ArgumentsNode(4...7)( - [ParenthesesNode(4...7)( - StatementsNode(5...6)([IntegerNode(5...6)()]), - (4...5), - (6...7) - )] - ), - nil, - BlockNode(8...11)( - [], - nil, - StatementsNode(9...10)( - [CallNode(9...10)(nil, nil, (9...10), nil, nil, nil, nil, 2, "c")] - ), - (8...9), - (10...11) - ), - 0, - "b" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/wtf_8.txt b/test/yarp/snapshots/seattlerb/wtf_8.txt deleted file mode 100644 index ed7a53a89a..0000000000 --- a/test/yarp/snapshots/seattlerb/wtf_8.txt +++ /dev/null @@ -1,30 +0,0 @@ -ProgramNode(0...12)( - [], - StatementsNode(0...12)( - [CallNode(0...12)( - CallNode(0...1)(nil, nil, (0...1), nil, nil, nil, nil, 2, "a"), - (1...3), - (3...4), - nil, - ArgumentsNode(5...8)( - [ParenthesesNode(5...8)( - StatementsNode(6...7)([IntegerNode(6...7)()]), - (5...6), - (7...8) - )] - ), - nil, - BlockNode(9...12)( - [], - nil, - StatementsNode(10...11)( - [CallNode(10...11)(nil, nil, (10...11), nil, nil, nil, nil, 2, "c")] - ), - (9...10), - (11...12) - ), - 0, - "b" - )] - ) -) diff --git a/test/yarp/snapshots/seattlerb/zomg_sometimes_i_hate_this_project.txt b/test/yarp/snapshots/seattlerb/zomg_sometimes_i_hate_this_project.txt deleted file mode 100644 index 44a67b3377..0000000000 --- a/test/yarp/snapshots/seattlerb/zomg_sometimes_i_hate_this_project.txt +++ /dev/null @@ -1,81 +0,0 @@ -ProgramNode(6...66)( - [], - StatementsNode(6...66)( - [HashNode(6...66)( - (6...7), - [AssocNode(16...41)( - SymbolNode(16...18)(nil, (16...17), (17...18), "a"), - CallNode(19...41)( - nil, - nil, - (19...25), - nil, - nil, - nil, - BlockNode(26...41)( - [], - nil, - StatementsNode(28...39)( - [IfNode(28...39)( - nil, - CallNode(28...29)( - nil, - nil, - (28...29), - nil, - nil, - nil, - nil, - 2, - "b" - ), - StatementsNode(32...35)( - [CallNode(32...35)( - nil, - nil, - (32...33), - (33...34), - nil, - (34...35), - nil, - 0, - "c" - )] - ), - ElseNode(36...39)( - (36...37), - StatementsNode(38...39)( - [CallNode(38...39)( - nil, - nil, - (38...39), - nil, - nil, - nil, - nil, - 2, - "d" - )] - ), - nil - ), - nil - )] - ), - (26...27), - (40...41) - ), - 0, - "lambda" - ), - nil - ), - AssocNode(51...57)( - SymbolNode(51...53)(nil, (51...52), (52...53), "e"), - NilNode(54...57)(), - nil - )], - (65...66) - )] - ) -) diff --git a/yarp/config.yml b/yarp/config.yml index 8e4518e70c..e4987013bb 100644 --- a/yarp/config.yml +++ b/yarp/config.yml @@ -736,24 +736,6 @@ nodes: class Foo end ^^^^^^^^^^^^^ -<<<<<<< HEAD:yarp/config.yml -======= - - name: ClassVariableOperatorWriteNode - child_nodes: - - name: name_loc - type: location - - name: operator_loc - type: location - - name: value - type: node - - name: operator - type: constant - comment: | - Represents assigning to a class variable using an operator that isn't `=`. - - @@target += value - ^^^^^^^^^^^^^^^^^ ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):config.yml - name: ClassVariableReadNode comment: | Represents referencing a class variable. @@ -773,24 +755,6 @@ nodes: @@foo = 1 ^^^^^^^^^ -<<<<<<< HEAD:yarp/config.yml -======= - - name: ConstantOperatorWriteNode - child_nodes: - - name: name_loc - type: location - - name: operator_loc - type: location - - name: value - type: node - - name: operator - type: constant - comment: | - Represents assigning to a constant using an operator that isn't `=`. - - Target += value - ^^^^^^^^^^^^^^^ ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):config.yml - name: ConstantPathNode child_nodes: - name: parent @@ -804,25 +768,6 @@ nodes: Foo::Bar ^^^^^^^^ -<<<<<<< HEAD:yarp/config.yml -======= - - name: ConstantPathOperatorWriteNode - child_nodes: - - name: target - type: node - kind: ConstantPathNode - - name: operator_loc - type: location - - name: value - type: node - - name: operator - type: constant - comment: | - Represents assigning to a constant path using an operator that isn't `=`. - - Parent::Child += value - ^^^^^^^^^^^^^^^^^^^^^^ ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):config.yml - name: ConstantPathWriteNode child_nodes: - name: target @@ -1065,24 +1010,6 @@ nodes: super ^^^^^ -<<<<<<< HEAD:yarp/config.yml -======= - - name: GlobalVariableOperatorWriteNode - child_nodes: - - name: name_loc - type: location - - name: operator_loc - type: location - - name: value - type: node - - name: operator - type: constant - comment: | - Represents assigning to a global variable using an operator that isn't `=`. - - $target += value - ^^^^^^^^^^^^^^^^ ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):config.yml - name: GlobalVariableReadNode comment: | Represents referencing a global variable. @@ -1182,24 +1109,6 @@ nodes: case a; in b then c end ^^^^^^^^^^^ -<<<<<<< HEAD:yarp/config.yml -======= - - name: InstanceVariableOperatorWriteNode - child_nodes: - - name: name_loc - type: location - - name: operator_loc - type: location - - name: value - type: node - - name: operator - type: constant - comment: | - Represents assigning to an instance variable using an operator that isn't `=`. - - @target += value - ^^^^^^^^^^^^^^^^ ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):config.yml - name: InstanceVariableReadNode comment: | Represents referencing an instance variable. @@ -1337,26 +1246,6 @@ nodes: ->(value) { value * 2 } ^^^^^^^^^^^^^^^^^^^^^^^ -<<<<<<< HEAD:yarp/config.yml -======= - - name: LocalVariableOperatorWriteNode - child_nodes: - - name: name_loc - type: location - - name: operator_loc - type: location - - name: value - type: node - - name: constant_id - type: constant - - name: operator_id - type: constant - comment: | - Represents assigning to a local variable using an operator that isn't `=`. - - target += value - ^^^^^^^^^^^^^^^ ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):config.yml - name: LocalVariableReadNode child_nodes: - name: constant_id @@ -1829,7 +1718,6 @@ nodes: __ENCODING__ ^^^^^^^^^^^^ - name: SourceFileNode - is_migrated: true child_nodes: - name: filepath type: string diff --git a/yarp/yarp.c b/yarp/yarp.c index e3199d31ae..8f93611d6b 100644 --- a/yarp/yarp.c +++ b/yarp/yarp.c @@ -1506,31 +1506,6 @@ yp_class_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const y return node; } -<<<<<<< HEAD:yarp/yarp.c -======= -// Allocate and initialize a new ClassVariableOperatorWriteNode node. -static yp_class_variable_operator_write_node_t * -yp_class_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value) { - yp_class_variable_operator_write_node_t *node = YP_ALLOC_NODE(parser, yp_class_variable_operator_write_node_t); - - *node = (yp_class_variable_operator_write_node_t) { - { - .type = YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE, - .location = { - .start = target->location.start, - .end = value->location.end - } - }, - .name_loc = target->location, - .operator_loc = YP_LOCATION_TOKEN_VALUE(operator), - .value = value, - .operator = yp_parser_constant_id_location(parser, operator->start, operator->end - 1) - }; - - return node; -} - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):src/yarp.c // Allocate and initialize a new ClassVariableReadNode node. static yp_class_variable_read_node_t * yp_class_variable_read_node_create(yp_parser_t *parser, const yp_token_t *token) { @@ -1561,31 +1536,6 @@ yp_class_variable_read_node_to_class_variable_write_node(yp_parser_t *parser, yp return node; } -<<<<<<< HEAD:yarp/yarp.c -======= -// Allocate and initialize a new ConstantPathOperatorWriteNode node. -static yp_constant_path_operator_write_node_t * -yp_constant_path_operator_write_node_create(yp_parser_t *parser, yp_constant_path_node_t *target, const yp_token_t *operator, yp_node_t *value) { - yp_constant_path_operator_write_node_t *node = YP_ALLOC_NODE(parser, yp_constant_path_operator_write_node_t); - - *node = (yp_constant_path_operator_write_node_t) { - { - .type = YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE, - .location = { - .start = target->base.location.start, - .end = value->location.end - } - }, - .target = target, - .operator_loc = YP_LOCATION_TOKEN_VALUE(operator), - .value = value, - .operator = yp_parser_constant_id_location(parser, operator->start, operator->end - 1) - }; - - return node; -} - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):src/yarp.c // Allocate and initialize a new ConstantPathNode node. static yp_constant_path_node_t * yp_constant_path_node_create(yp_parser_t *parser, yp_node_t *parent, const yp_token_t *delimiter, yp_node_t *child) { @@ -1628,31 +1578,6 @@ yp_constant_path_write_node_create(yp_parser_t *parser, yp_constant_path_node_t return node; } -<<<<<<< HEAD:yarp/yarp.c -======= -// Allocate and initialize a new ConstantOperatorWriteNode node. -static yp_constant_operator_write_node_t * -yp_constant_operator_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value) { - yp_constant_operator_write_node_t *node = YP_ALLOC_NODE(parser, yp_constant_operator_write_node_t); - - *node = (yp_constant_operator_write_node_t) { - { - .type = YP_NODE_CONSTANT_OPERATOR_WRITE_NODE, - .location = { - .start = target->location.start, - .end = value->location.end - } - }, - .name_loc = target->location, - .operator_loc = YP_LOCATION_TOKEN_VALUE(operator), - .value = value, - .operator = yp_parser_constant_id_location(parser, operator->start, operator->end - 1) - }; - - return node; -} - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):src/yarp.c // Allocate and initialize a new ConstantReadNode node. static yp_constant_read_node_t * yp_constant_read_node_create(yp_parser_t *parser, const yp_token_t *name) { @@ -2087,31 +2012,6 @@ yp_hash_pattern_node_node_list_create(yp_parser_t *parser, yp_node_list_t *assoc return node; } -<<<<<<< HEAD:yarp/yarp.c -======= -// Allocate and initialize a new GlobalVariableOperatorWriteNode node. -static yp_global_variable_operator_write_node_t * -yp_global_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value) { - yp_global_variable_operator_write_node_t *node = YP_ALLOC_NODE(parser, yp_global_variable_operator_write_node_t); - - *node = (yp_global_variable_operator_write_node_t) { - { - .type = YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE, - .location = { - .start = target->location.start, - .end = value->location.end - } - }, - .name_loc = target->location, - .operator_loc = YP_LOCATION_TOKEN_VALUE(operator), - .value = value, - .operator = yp_parser_constant_id_location(parser, operator->start, operator->end - 1) - }; - - return node; -} - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):src/yarp.c // Allocate a new GlobalVariableReadNode node. static yp_global_variable_read_node_t * yp_global_variable_read_node_create(yp_parser_t *parser, const yp_token_t *name) { @@ -2402,31 +2302,6 @@ yp_in_node_create(yp_parser_t *parser, yp_node_t *pattern, yp_statements_node_t return node; } -<<<<<<< HEAD:yarp/yarp.c -======= -// Allocate and initialize a new InstanceVariableOperatorWriteNode node. -static yp_instance_variable_operator_write_node_t * -yp_instance_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value) { - yp_instance_variable_operator_write_node_t *node = YP_ALLOC_NODE(parser, yp_instance_variable_operator_write_node_t); - - *node = (yp_instance_variable_operator_write_node_t) { - { - .type = YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE, - .location = { - .start = target->location.start, - .end = value->location.end - } - }, - .name_loc = target->location, - .operator_loc = YP_LOCATION_TOKEN_VALUE(operator), - .value = value, - .operator = yp_parser_constant_id_location(parser, operator->start, operator->end - 1) - }; - - return node; -} - ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):src/yarp.c // Allocate and initialize a new InstanceVariableReadNode node. static yp_instance_variable_read_node_t * yp_instance_variable_read_node_create(yp_parser_t *parser, const yp_token_t *token) { @@ -2694,38 +2569,7 @@ yp_lambda_node_create( .locals = *locals, .opening_loc = YP_LOCATION_TOKEN_VALUE(opening), .parameters = parameters, -<<<<<<< HEAD:yarp/yarp.c -<<<<<<< HEAD:yarp/yarp.c .body = body -======= - .statements = statements -======= - .body = body ->>>>>>> 0aa7d9d10c (Rename statements to body where appropriate):src/yarp.c - }; - - return node; -} - -// Allocate and initialize a new LocalVariableOperatorWriteNode node. -static yp_local_variable_operator_write_node_t * -yp_local_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value, yp_constant_id_t constant_id) { - yp_local_variable_operator_write_node_t *node = YP_ALLOC_NODE(parser, yp_local_variable_operator_write_node_t); - - *node = (yp_local_variable_operator_write_node_t) { - { - .type = YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE, - .location = { - .start = target->location.start, - .end = value->location.end - } - }, - .name_loc = target->location, - .operator_loc = YP_LOCATION_TOKEN_VALUE(operator), - .value = value, - .constant_id = constant_id, - .operator_id = yp_parser_constant_id_location(parser, operator->start, operator->end - 1) ->>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):src/yarp.c }; return node; @@ -6369,17 +6213,7 @@ parser_lex(yp_parser_t *parser) { if (parser->current.end < parser->end) { lex_mode_push_regexp(parser, lex_mode_incrementor(*parser->current.end), lex_mode_terminator(*parser->current.end)); -<<<<<<< HEAD:yarp/yarp.c -<<<<<<< HEAD:yarp/yarp.c yp_newline_list_check_append(&parser->newline_list, parser->current.end); -======= - if (parser->current.end == '\n') { - yp_newline_list_append(&parser->newline_list, parser->current.end); - } ->>>>>>> 0d5d759091 (fix: support newline-terminated regular expressions):src/yarp.c -======= - yp_newline_list_check_append(&parser->newline_list, parser->current.end); ->>>>>>> 149c74291b (prefactor: extract yp_newline_list_check_append):src/yarp.c parser->current.end++; }