Repository: ruby/yarp
Pull request #1417 (2023-09-06 19:30:48)

Remove name constant from classes/modules


Patch:
diff --git a/config.yml b/config.yml
index 5ccdabab..4207e09a 100644
--- a/config.yml
+++ b/config.yml
@@ -782,8 +782,6 @@ nodes:
         type: location
       - name: name
         type: constant
-      - name: name_constant
-        type: constant
     comment: |
       Represents a class declaration involving the `class` keyword.
 
@@ -1742,8 +1740,6 @@ nodes:
         type: location
       - name: name
         type: constant
-      - name: name_constant
-        type: constant
     comment: |
       Represents a module declaration involving the `module` keyword.
 
diff --git a/src/yarp.c b/src/yarp.c
index 2bce80ab..17ef80c4 100644
--- a/src/yarp.c
+++ b/src/yarp.c
@@ -1655,7 +1655,6 @@ yp_case_node_end_keyword_loc_set(yp_case_node_t *node, const yp_token_t *end_key
 static yp_class_node_t *
 yp_class_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const yp_token_t *class_keyword, yp_node_t *constant_path, const yp_token_t *name, const yp_token_t *inheritance_operator, yp_node_t *superclass, yp_node_t *body, const yp_token_t *end_keyword) {
     yp_class_node_t *node = YP_ALLOC_NODE(parser, yp_class_node_t);
-    yp_constant_id_t name_constant = yp_parser_constant_id_token(parser, name);
 
     *node = (yp_class_node_t) {
         {
@@ -1669,8 +1668,7 @@ yp_class_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const y
         .superclass = superclass,
         .body = body,
         .end_keyword_loc = YP_LOCATION_TOKEN_VALUE(end_keyword),
-        .name = name_constant,
-        .name_constant = name_constant
+        .name = yp_parser_constant_id_token(parser, name)
     };
 
     return node;
@@ -3305,7 +3303,6 @@ yp_match_required_node_create(yp_parser_t *parser, yp_node_t *value, yp_node_t *
 static yp_module_node_t *
 yp_module_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const yp_token_t *module_keyword, yp_node_t *constant_path, const yp_token_t *name, yp_node_t *body, const yp_token_t *end_keyword) {
     yp_module_node_t *node = YP_ALLOC_NODE(parser, yp_module_node_t);
-    yp_constant_id_t name_constant = yp_parser_constant_id_token(parser, name);
 
     *node = (yp_module_node_t) {
         {
@@ -3320,8 +3317,7 @@ yp_module_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const
         .constant_path = constant_path,
         .body = body,
         .end_keyword_loc = YP_LOCATION_TOKEN_VALUE(end_keyword),
-        .name = name_constant,
-        .name_constant = name_constant
+        .name = yp_parser_constant_id_token(parser, name)
     };
 
     return node;


Test patch:
diff --git a/test/yarp/errors_test.rb b/test/yarp/errors_test.rb
index 6c03960e..5c714c26 100644
--- a/test/yarp/errors_test.rb
+++ b/test/yarp/errors_test.rb
@@ -19,10 +19,9 @@ module YARP
         Location(),
         ConstantReadNode(:Parent),
         StatementsNode(
-          [ModuleNode([], Location(), MissingNode(), nil, Location(), :"", :"")]
+          [ModuleNode([], Location(), MissingNode(), nil, Location(), :"")]
         ),
         Location(),
-        :Parent,
         :Parent
       )
 
@@ -394,7 +393,7 @@ module YARP
         Location(),
         nil,
         nil,
-        StatementsNode([ModuleNode([], Location(), ConstantReadNode(:A), nil, Location(), :A, :A)]),
+        StatementsNode([ModuleNode([], Location(), ConstantReadNode(:A), nil, Location(), :A)]),
         [],
         Location(),
         nil,
@@ -425,7 +424,7 @@ module YARP
             BlockNode(
               [],
               nil,
-              StatementsNode([ModuleNode([], Location(), ConstantReadNode(:Foo), nil, Location(), :Foo, :Foo)]),
+              StatementsNode([ModuleNode([], Location(), ConstantReadNode(:Foo), nil, Location(), :Foo)]),
               Location(),
               Location()
             ),
@@ -465,7 +464,6 @@ module YARP
             nil,
             nil,
             Location(),
-            :A,
             :A
           )]
         ),
@@ -981,7 +979,6 @@ module YARP
         nil,
         StatementsNode([ReturnNode(Location(), nil)]),
         Location(),
-        :A,
         :A
       )
 
@@ -997,7 +994,6 @@ module YARP
         ConstantReadNode(:A),
         StatementsNode([ReturnNode(Location(), nil)]),
         Location(),
-        :A,
         :A
       )
 
diff --git a/test/yarp/snapshots/classes.txt b/test/yarp/snapshots/classes.txt
index 43c0d24a..0679fe95 100644
--- a/test/yarp/snapshots/classes.txt
+++ b/test/yarp/snapshots/classes.txt
@@ -17,7 +17,6 @@ ProgramNode(0...370)(
           )]
        ),
        (14...17),
-       :A,
        :A
      ),
      ClassNode(19...39)(
@@ -35,7 +34,6 @@ ProgramNode(0...370)(
          (36...39)
        ),
        (36...39),
-       :A,
        :A
      ),
      ClassNode(41...75)(
@@ -53,7 +51,6 @@ ProgramNode(0...370)(
          (72...75)
        ),
        (72...75),
-       :A,
        :A
      ),
      ClassNode(77...98)(
@@ -72,7 +69,6 @@ ProgramNode(0...370)(
           )]
        ),
        (95...98),
-       :A,
        :A
      ),
      SingletonClassNode(100...120)(
@@ -127,7 +123,6 @@ ProgramNode(0...370)(
           )]
        ),
        (159...162),
-       :A,
        :A
      ),
      ClassNode(164...218)(
@@ -154,7 +149,6 @@ ProgramNode(0...370)(
           )]
        ),
        (215...218),
-       :A,
        :A
      ),
      SingletonClassNode(220...240)(
@@ -287,7 +281,6 @@ ProgramNode(0...370)(
        ),
        nil,
        (367...370),
-       :A,
        :A
      )]
   )
diff --git a/test/yarp/snapshots/method_calls.txt b/test/yarp/snapshots/method_calls.txt
index f320ab86..6cec125e 100644
--- a/test/yarp/snapshots/method_calls.txt
+++ b/test/yarp/snapshots/method_calls.txt
@@ -1192,7 +1192,6 @@ ProgramNode(0...1237)(
                )]
             ),
             (926...929),
-            :Bar,
             :Bar
           )]
        ),
@@ -1225,7 +1224,6 @@ ProgramNode(0...1237)(
                )]
             ),
             (957...960),
-            :Bar,
             :Bar
           )]
        ),
diff --git a/test/yarp/snapshots/modules.txt b/test/yarp/snapshots/modules.txt
index 306e7db3..741c3c84 100644
--- a/test/yarp/snapshots/modules.txt
+++ b/test/yarp/snapshots/modules.txt
@@ -15,7 +15,6 @@ ProgramNode(0...140)(
           )]
        ),
        (15...18),
-       :A,
        :A
      ),
      InterpolatedStringNode(20...38)(
@@ -51,7 +50,6 @@ ProgramNode(0...140)(
        ),
        nil,
        (52...55),
-       :M,
        :M
      ),
      ModuleNode(57...85)(
@@ -75,7 +73,6 @@ ProgramNode(0...140)(
          (82...85)
        ),
        (82...85),
-       :A,
        :A
      ),
      ModuleNode(87...101)(
@@ -88,7 +85,6 @@ ProgramNode(0...140)(
        ),
        nil,
        (98...101),
-       :A,
        :A
      ),
      ModuleNode(103...120)(
@@ -111,7 +107,6 @@ ProgramNode(0...140)(
        ),
        nil,
        (117...120),
-       :B,
        :B
      ),
      ModuleNode(122...140)(
@@ -134,7 +129,6 @@ ProgramNode(0...140)(
        ),
        nil,
        (137...140),
-       :B,
        :B
      )]
   )
diff --git a/test/yarp/snapshots/seattlerb/TestRubyParserShared.txt b/test/yarp/snapshots/seattlerb/TestRubyParserShared.txt
index 6ae8ed6d..d839450b 100644
--- a/test/yarp/snapshots/seattlerb/TestRubyParserShared.txt
+++ b/test/yarp/snapshots/seattlerb/TestRubyParserShared.txt
@@ -87,7 +87,6 @@ ProgramNode(0...689)(
           )]
        ),
        (266...269),
-       :X,
        :X
      ),
      ClassNode(293...376)(
@@ -112,12 +111,10 @@ ProgramNode(0...689)(
                )]
             ),
             (355...358),
-            :Y,
             :Y
           )]
        ),
        (373...376),
-       :X,
        :X
      ),
      ClassNode(395...498)(
@@ -165,7 +162,6 @@ ProgramNode(0...689)(
           )]
        ),
        (495...498),
-       :X,
        :X
      ),
      ModuleNode(517...565)(
@@ -186,7 +182,6 @@ ProgramNode(0...689)(
           )]
        ),
        (562...565),
-       :X,
        :X
      ),
      ModuleNode(568...651)(
@@ -207,12 +202,10 @@ ProgramNode(0...689)(
                )]
             ),
             (630...633),
-            :Y,
             :Y
           )]
        ),
        (648...651),
-       :X,
        :X
      ),
      CallNode(670...689)(
diff --git a/test/yarp/snapshots/seattlerb/class_comments.txt b/test/yarp/snapshots/seattlerb/class_comments.txt
index 905c5914..85d9d910 100644
--- a/test/yarp/snapshots/seattlerb/class_comments.txt
+++ b/test/yarp/snapshots/seattlerb/class_comments.txt
@@ -23,7 +23,6 @@ ProgramNode(19...71)(
           )]
        ),
        (68...71),
-       :X,
        :X
      )]
   )
diff --git a/test/yarp/snapshots/seattlerb/defn_oneliner_eq2.txt b/test/yarp/snapshots/seattlerb/defn_oneliner_eq2.txt
index bbbdc173..b2d59818 100644
--- a/test/yarp/snapshots/seattlerb/defn_oneliner_eq2.txt
+++ b/test/yarp/snapshots/seattlerb/defn_oneliner_eq2.txt
@@ -31,7 +31,6 @@ ProgramNode(0...28)(
           )]
        ),
        (25...28),
-       :X,
        :X
      )]
   )
diff --git a/test/yarp/snapshots/seattlerb/defs_oneliner_eq2.txt b/test/yarp/snapshots/seattlerb/defs_oneliner_eq2.txt
index 1a88fffa..cebb94c3 100644
--- a/test/yarp/snapshots/seattlerb/defs_oneliner_eq2.txt
+++ b/test/yarp/snapshots/seattlerb/defs_oneliner_eq2.txt
@@ -31,7 +31,6 @@ ProgramNode(0...33)(
           )]
        ),
        (30...33),
-       :X,
        :X
      )]
   )
diff --git a/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt b/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt
index 77efd6f4..2baa7bab 100644
--- a/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt
+++ b/test/yarp/snapshots/seattlerb/magic_encoding_comment.txt
@@ -31,7 +31,6 @@ ProgramNode(18...90)(
           )]
        ),
        (87...90),
-       :ExampleUTF8ClassNameVarietà,
        :ExampleUTF8ClassNameVarietà
      )]
   )
diff --git a/test/yarp/snapshots/seattlerb/module_comments.txt b/test/yarp/snapshots/seattlerb/module_comments.txt
index 152697f4..0a818d31 100644
--- a/test/yarp/snapshots/seattlerb/module_comments.txt
+++ b/test/yarp/snapshots/seattlerb/module_comments.txt
@@ -21,7 +21,6 @@ ProgramNode(24...77)(
           )]
        ),
        (74...77),
-       :X,
        :X
      )]
   )
diff --git a/test/yarp/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt b/test/yarp/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt
index 623eb3aa..4d1925d5 100644
--- a/test/yarp/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt
+++ b/test/yarp/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt
@@ -19,7 +19,6 @@ ProgramNode(0...48)(
        nil,
        nil,
        (45...48),
-       :Foo,
        :Foo
      )]
   )
diff --git a/test/yarp/snapshots/unparser/corpus/literal/class.txt b/test/yarp/snapshots/unparser/corpus/literal/class.txt
index cb49848a..4d8b7056 100644
--- a/test/yarp/snapshots/unparser/corpus/literal/class.txt
+++ b/test/yarp/snapshots/unparser/corpus/literal/class.txt
@@ -9,7 +9,6 @@ ProgramNode(0...213)(
        nil,
        nil,
        (8...11),
-       :A,
        :A
      ),
      SingletonClassNode(13...27)(
@@ -42,7 +41,6 @@ ProgramNode(0...213)(
        nil,
        nil,
        (60...63),
-       :B,
        :B
      ),
      ClassNode(65...82)(
@@ -61,7 +59,6 @@ ProgramNode(0...213)(
        nil,
        nil,
        (79...82),
-       :C,
        :C
      ),
      ClassNode(84...99)(
@@ -72,7 +69,6 @@ ProgramNode(0...213)(
        ConstantReadNode(94...95)(:B),
        nil,
        (96...99),
-       :A,
        :A
      ),
      ClassNode(101...119)(
@@ -87,7 +83,6 @@ ProgramNode(0...213)(
        ),
        nil,
        (116...119),
-       :A,
        :A
      ),
      ClassNode(121...142)(
@@ -106,7 +101,6 @@ ProgramNode(0...213)(
        ),
        nil,
        (139...142),
-       :B,
        :B
      ),
      ClassNode(144...198)(
@@ -156,7 +150,6 @@ ProgramNode(0...213)(
           )]
        ),
        (195...198),
-       :A,
        :A
      ),
      ClassNode(200...213)(
@@ -171,7 +164,6 @@ ProgramNode(0...213)(
        nil,
        nil,
        (210...213),
-       :A,
        :A
      )]
   )
diff --git a/test/yarp/snapshots/unparser/corpus/literal/if.txt b/test/yarp/snapshots/unparser/corpus/literal/if.txt
index 455db66a..610dac8d 100644
--- a/test/yarp/snapshots/unparser/corpus/literal/if.txt
+++ b/test/yarp/snapshots/unparser/corpus/literal/if.txt
@@ -81,7 +81,6 @@ ProgramNode(0...246)(
           )]
        ),
        (130...133),
-       :A,
        :A
      ),
      ModuleNode(135...170)(
@@ -116,7 +115,6 @@ ProgramNode(0...246)(
           )]
        ),
        (167...170),
-       :B,
        :B
      ),
      UnlessNode(171...197)(
diff --git a/test/yarp/snapshots/unparser/corpus/literal/module.txt b/test/yarp/snapshots/unparser/corpus/literal/module.txt
index 28de3bfa..e9b4470d 100644
--- a/test/yarp/snapshots/unparser/corpus/literal/module.txt
+++ b/test/yarp/snapshots/unparser/corpus/literal/module.txt
@@ -7,7 +7,6 @@ ProgramNode(0...106)(
        ConstantReadNode(7...8)(:A),
        nil,
        (9...12),
-       :A,
        :A
      ),
      ModuleNode(14...29)(
@@ -20,7 +19,6 @@ ProgramNode(0...106)(
        ),
        nil,
        (26...29),
-       :B,
        :B
      ),
      ModuleNode(31...49)(
@@ -37,7 +35,6 @@ ProgramNode(0...106)(
        ),
        nil,
        (46...49),
-       :C,
        :C
      ),
      ModuleNode(51...106)(
@@ -85,7 +82,6 @@ ProgramNode(0...106)(
           )]
        ),
        (103...106),
-       :A,
        :A
      )]
   )
diff --git a/test/yarp/snapshots/unparser/corpus/literal/send.txt b/test/yarp/snapshots/unparser/corpus/literal/send.txt
index fccb137c..cc3f23be 100644
--- a/test/yarp/snapshots/unparser/corpus/literal/send.txt
+++ b/test/yarp/snapshots/unparser/corpus/literal/send.txt
@@ -38,7 +38,6 @@ ProgramNode(0...999)(
           )]
        ),
        (32...35),
-       :A,
        :A
      ),
      ModuleNode(37...73)(
@@ -66,7 +65,6 @@ ProgramNode(0...999)(
           )]
        ),
        (70...73),
-       :A,
        :A
      ),
      CallNode(74...89)(
@@ -78,7 +76,6 @@ ProgramNode(0...999)(
          nil,
          nil,
          (82...85),
-         :A,
          :A
        ),
        (85...86),
@@ -97,7 +94,6 @@ ProgramNode(0...999)(
          ConstantReadNode(97...98)(:A),
          nil,
          (99...102),
-         :A,
          :A
        ),
        (102...103),
diff --git a/test/yarp/snapshots/unparser/corpus/literal/while.txt b/test/yarp/snapshots/unparser/corpus/literal/while.txt
index 4d924f0d..6d90f455 100644
--- a/test/yarp/snapshots/unparser/corpus/literal/while.txt
+++ b/test/yarp/snapshots/unparser/corpus/literal/while.txt
@@ -64,7 +64,6 @@ ProgramNode(0...620)(
           )]
        ),
        (65...68),
-       :A,
        :A
      ),
      DefNode(70...110)(
@@ -160,7 +159,6 @@ ProgramNode(0...620)(
           )]
        ),
        (143...146),
-       :A,
        :A
      ),
      ModuleNode(148...182)(
@@ -195,7 +193,6 @@ ProgramNode(0...620)(
           )]
        ),
        (179...182),
-       :A,
        :A
      ),
      ModuleNode(184...228)(
@@ -240,7 +237,6 @@ ProgramNode(0...620)(
           )]
        ),
        (225...228),
-       :A,
        :A
      ),
      ModuleNode(230...299)(
@@ -316,7 +312,6 @@ ProgramNode(0...620)(
           )]
        ),
        (296...299),
-       :A,
        :A
      ),
      ModuleNode(301...370)(
@@ -382,7 +377,6 @@ ProgramNode(0...620)(
           )]
        ),
        (367...370),
-       :A,
        :A
      ),
      LocalVariableWriteNode(371...402)(
diff --git a/test/yarp/snapshots/unparser/corpus/semantic/while.txt b/test/yarp/snapshots/unparser/corpus/semantic/while.txt
index 3e6ef668..6b29da7e 100644
--- a/test/yarp/snapshots/unparser/corpus/semantic/while.txt
+++ b/test/yarp/snapshots/unparser/corpus/semantic/while.txt
@@ -186,7 +186,6 @@ ProgramNode(0...188)(
           )]
        ),
        (185...188),
-       :A,
        :A
      )]
   )
diff --git a/test/yarp/snapshots/while.txt b/test/yarp/snapshots/while.txt
index 843db1e1..aeb0fc9b 100644
--- a/test/yarp/snapshots/while.txt
+++ b/test/yarp/snapshots/while.txt
@@ -139,7 +139,6 @@ ProgramNode(0...314)(
             )]
          ),
          (195...198),
-         :Foo,
          :Foo
        ),
        StatementsNode(200...205)([BreakNode(200...205)(nil, (200...205))]),
diff --git a/test/yarp/snapshots/whitequark/class.txt b/test/yarp/snapshots/whitequark/class.txt
index 84ab3a72..692e7085 100644
--- a/test/yarp/snapshots/whitequark/class.txt
+++ b/test/yarp/snapshots/whitequark/class.txt
@@ -9,7 +9,6 @@ ProgramNode(0...29)(
        nil,
        nil,
        (10...13),
-       :Foo,
        :Foo
      ),
      ClassNode(15...29)(
@@ -20,7 +19,6 @@ ProgramNode(0...29)(
        nil,
        nil,
        (26...29),
-       :Foo,
        :Foo
      )]
   )
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 cec17515..8fbb656c 100644
--- a/test/yarp/snapshots/whitequark/class_definition_in_while_cond.txt
+++ b/test/yarp/snapshots/whitequark/class_definition_in_while_cond.txt
@@ -88,7 +88,6 @@ ProgramNode(0...197)(
             )]
          ),
          (136...139),
-         :Foo,
          :Foo
        ),
        StatementsNode(141...146)([BreakNode(141...146)(nil, (141...146))]),
@@ -117,7 +116,6 @@ ProgramNode(0...197)(
             )]
          ),
          (182...185),
-         :Foo,
          :Foo
        ),
        StatementsNode(187...192)([BreakNode(187...192)(nil, (187...192))]),
diff --git a/test/yarp/snapshots/whitequark/class_super.txt b/test/yarp/snapshots/whitequark/class_super.txt
index ec400beb..a2458fe1 100644
--- a/test/yarp/snapshots/whitequark/class_super.txt
+++ b/test/yarp/snapshots/whitequark/class_super.txt
@@ -9,7 +9,6 @@ ProgramNode(0...20)(
        ConstantReadNode(12...15)(:Bar),
        nil,
        (17...20),
-       :Foo,
        :Foo
      )]
   )
diff --git a/test/yarp/snapshots/whitequark/class_super_label.txt b/test/yarp/snapshots/whitequark/class_super_label.txt
index 8ebba419..ab6bf568 100644
--- a/test/yarp/snapshots/whitequark/class_super_label.txt
+++ b/test/yarp/snapshots/whitequark/class_super_label.txt
@@ -21,7 +21,6 @@ ProgramNode(0...20)(
        ),
        nil,
        (17...20),
-       :Foo,
        :Foo
      )]
   )
diff --git a/test/yarp/snapshots/whitequark/cpath.txt b/test/yarp/snapshots/whitequark/cpath.txt
index b557da7e..7e3f62ee 100644
--- a/test/yarp/snapshots/whitequark/cpath.txt
+++ b/test/yarp/snapshots/whitequark/cpath.txt
@@ -7,7 +7,6 @@ ProgramNode(0...39)(
        ConstantPathNode(7...12)(nil, ConstantReadNode(9...12)(:Foo), (7...9)),
        nil,
        (14...17),
-       :Foo,
        :Foo
      ),
      ModuleNode(19...39)(
@@ -20,7 +19,6 @@ ProgramNode(0...39)(
        ),
        nil,
        (36...39),
-       :Foo,
        :Foo
      )]
   )
diff --git a/test/yarp/snapshots/whitequark/if_while_after_class__since_32.txt b/test/yarp/snapshots/whitequark/if_while_after_class__since_32.txt
index c18c1b4e..f2ba2a12 100644
--- a/test/yarp/snapshots/whitequark/if_while_after_class__since_32.txt
+++ b/test/yarp/snapshots/whitequark/if_while_after_class__since_32.txt
@@ -19,7 +19,6 @@ ProgramNode(0...178)(
        nil,
        nil,
        (35...38),
-       :Kernel,
        :Kernel
      ),
      ClassNode(40...87)(
@@ -45,7 +44,6 @@ ProgramNode(0...178)(
        nil,
        nil,
        (84...87),
-       :Kernel,
        :Kernel
      ),
      ModuleNode(89...128)(
@@ -64,7 +62,6 @@ ProgramNode(0...178)(
        ),
        nil,
        (125...128),
-       :Kernel,
        :Kernel
      ),
      ModuleNode(130...178)(
@@ -90,7 +87,6 @@ ProgramNode(0...178)(
        ),
        nil,
        (175...178),
-       :Kernel,
        :Kernel
      )]
   )
diff --git a/test/yarp/snapshots/whitequark/module.txt b/test/yarp/snapshots/whitequark/module.txt
index 7880ab99..18d3d2e9 100644
--- a/test/yarp/snapshots/whitequark/module.txt
+++ b/test/yarp/snapshots/whitequark/module.txt
@@ -7,7 +7,6 @@ ProgramNode(0...15)(
        ConstantReadNode(7...10)(:Foo),
        nil,
        (12...15),
-       :Foo,
        :Foo
      )]
   )
diff --git a/test/yarp/snapshots/whitequark/numparam_outside_block.txt b/test/yarp/snapshots/whitequark/numparam_outside_block.txt
index 61d138fa..5b41378a 100644
--- a/test/yarp/snapshots/whitequark/numparam_outside_block.txt
+++ b/test/yarp/snapshots/whitequark/numparam_outside_block.txt
@@ -22,7 +22,6 @@ ProgramNode(0...83)(
          [CallNode(36...38)(nil, nil, (36...38), nil, nil, nil, nil, 2, "_1")]
        ),
        (40...43),
-       :A,
        :A
      ),
      DefNode(45...64)(
@@ -48,7 +47,6 @@ ProgramNode(0...83)(
          [CallNode(76...78)(nil, nil, (76...78), nil, nil, nil, nil, 2, "_1")]
        ),
        (80...83),
-       :A,
        :A
      )]
   )
diff --git a/test/yarp/snapshots/whitequark/parser_bug_490.txt b/test/yarp/snapshots/whitequark/parser_bug_490.txt
index b3b5b04a..a82c7d1b 100644
--- a/test/yarp/snapshots/whitequark/parser_bug_490.txt
+++ b/test/yarp/snapshots/whitequark/parser_bug_490.txt
@@ -49,7 +49,6 @@ ProgramNode(0...132)(
                  nil,
                  nil,
                  (72...75),
-                 :C,
                  :C
                )]
             ),
@@ -81,7 +80,6 @@ ProgramNode(0...132)(
                  ConstantReadNode(116...117)(:M),
                  nil,
                  (119...122),
-                 :M,
                  :M
                )]
             ),
diff --git a/test/yarp/snapshots/whitequark/parser_bug_518.txt b/test/yarp/snapshots/whitequark/parser_bug_518.txt
index fc53bcb5..1f2cca8d 100644
--- a/test/yarp/snapshots/whitequark/parser_bug_518.txt
+++ b/test/yarp/snapshots/whitequark/parser_bug_518.txt
@@ -9,7 +9,6 @@ ProgramNode(0...15)(
        ConstantReadNode(10...11)(:B),
        nil,
        (12...15),
-       :A,
        :A
      )]
   )