Skip to content

Commit 22b287e

Browse files
committed
Consolidate operator write nodes
1 parent 9e680a7 commit 22b287e

19 files changed

+166
-433
lines changed

config.yml

Lines changed: 15 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -736,21 +736,6 @@ nodes:
736736
737737
class Foo end
738738
^^^^^^^^^^^^^
739-
- name: ClassVariableOperatorWriteNode
740-
child_nodes:
741-
- name: name_loc
742-
type: location
743-
- name: operator_loc
744-
type: location
745-
- name: value
746-
type: node
747-
- name: operator
748-
type: constant
749-
comment: |
750-
Represents assigning to a class variable using an operator that isn't `=`.
751-
752-
@@target += value
753-
^^^^^^^^^^^^^^^^^
754739
- name: ClassVariableReadNode
755740
comment: |
756741
Represents referencing a class variable.
@@ -770,21 +755,6 @@ nodes:
770755
771756
@@foo = 1
772757
^^^^^^^^^
773-
- name: ConstantOperatorWriteNode
774-
child_nodes:
775-
- name: name_loc
776-
type: location
777-
- name: operator_loc
778-
type: location
779-
- name: value
780-
type: node
781-
- name: operator
782-
type: constant
783-
comment: |
784-
Represents assigning to a constant using an operator that isn't `=`.
785-
786-
Target += value
787-
^^^^^^^^^^^^^^^
788758
- name: ConstantPathNode
789759
child_nodes:
790760
- name: parent
@@ -798,22 +768,6 @@ nodes:
798768
799769
Foo::Bar
800770
^^^^^^^^
801-
- name: ConstantPathOperatorWriteNode
802-
child_nodes:
803-
- name: target
804-
type: node
805-
kind: ConstantPathNode
806-
- name: operator_loc
807-
type: location
808-
- name: value
809-
type: node
810-
- name: operator
811-
type: constant
812-
comment: |
813-
Represents assigning to a constant path using an operator that isn't `=`.
814-
815-
Parent::Child += value
816-
^^^^^^^^^^^^^^^^^^^^^^
817771
- name: ConstantPathWriteNode
818772
child_nodes:
819773
- name: target
@@ -1056,21 +1010,6 @@ nodes:
10561010
10571011
super
10581012
^^^^^
1059-
- name: GlobalVariableOperatorWriteNode
1060-
child_nodes:
1061-
- name: name_loc
1062-
type: location
1063-
- name: operator_loc
1064-
type: location
1065-
- name: value
1066-
type: node
1067-
- name: operator
1068-
type: constant
1069-
comment: |
1070-
Represents assigning to a global variable using an operator that isn't `=`.
1071-
1072-
$target += value
1073-
^^^^^^^^^^^^^^^^
10741013
- name: GlobalVariableReadNode
10751014
comment: |
10761015
Represents referencing a global variable.
@@ -1170,21 +1109,6 @@ nodes:
11701109
11711110
case a; in b then c end
11721111
^^^^^^^^^^^
1173-
- name: InstanceVariableOperatorWriteNode
1174-
child_nodes:
1175-
- name: name_loc
1176-
type: location
1177-
- name: operator_loc
1178-
type: location
1179-
- name: value
1180-
type: node
1181-
- name: operator
1182-
type: constant
1183-
comment: |
1184-
Represents assigning to an instance variable using an operator that isn't `=`.
1185-
1186-
@target += value
1187-
^^^^^^^^^^^^^^^^
11881112
- name: InstanceVariableReadNode
11891113
comment: |
11901114
Represents referencing an instance variable.
@@ -1322,23 +1246,6 @@ nodes:
13221246
13231247
->(value) { value * 2 }
13241248
^^^^^^^^^^^^^^^^^^^^^^^
1325-
- name: LocalVariableOperatorWriteNode
1326-
child_nodes:
1327-
- name: name_loc
1328-
type: location
1329-
- name: operator_loc
1330-
type: location
1331-
- name: value
1332-
type: node
1333-
- name: constant_id
1334-
type: constant
1335-
- name: operator_id
1336-
type: constant
1337-
comment: |
1338-
Represents assigning to a local variable using an operator that isn't `=`.
1339-
1340-
target += value
1341-
^^^^^^^^^^^^^^^
13421249
- name: LocalVariableReadNode
13431250
child_nodes:
13441251
- name: constant_id
@@ -1469,6 +1376,21 @@ nodes:
14691376
14701377
$1
14711378
^^
1379+
- name: OperatorWriteNode
1380+
child_nodes:
1381+
- name: target
1382+
type: node
1383+
- name: operator_loc
1384+
type: location
1385+
- name: operator
1386+
type: constant
1387+
- name: value
1388+
type: node
1389+
comment: |
1390+
Represents the use of an operator on a write.
1391+
1392+
target += value
1393+
^^^^^^^^^^^^^^^
14721394
- name: OptionalParameterNode
14731395
child_nodes:
14741396
- name: constant_id

0 commit comments

Comments
 (0)