Skip to content

Commit f1f8776

Browse files
committed
Add document CallOperatorWriteNode fields
Partially fixes: #2123
1 parent 3167699 commit f1f8776

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

config.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,21 +1529,61 @@ nodes:
15291529
- name: receiver
15301530
type: node?
15311531
kind: non-void expression
1532+
comment: |
1533+
The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
1534+
1535+
foo.bar += value
1536+
^^^
15321537
- name: call_operator_loc
15331538
type: location?
1539+
comment: |
1540+
Represents the location of the call operator.
1541+
1542+
foo.bar += value
1543+
^
15341544
- name: message_loc
15351545
type: location?
1546+
comment: |
1547+
Represents the location of the message.
1548+
1549+
foo.bar += value
1550+
^^^
15361551
- name: read_name
15371552
type: constant
1553+
comment: |
1554+
Represents the name of the method being called.
1555+
1556+
foo.bar += value # read_name `:bar`
1557+
^^^
15381558
- name: write_name
15391559
type: constant
1560+
comment: |
1561+
Represents the name of the method being written to.
1562+
1563+
foo.bar += value # write_name `:bar=`
1564+
^^^
15401565
- name: binary_operator
15411566
type: constant
1567+
comment: |
1568+
Represents the binary operator being used.
1569+
1570+
foo.bar += value # binary_operator `:+`
1571+
^
15421572
- name: binary_operator_loc
15431573
type: location
1574+
comment: |
1575+
Represents the location of the binary operator.
1576+
1577+
foo.bar += value
1578+
^^
15441579
- name: value
15451580
type: node
15461581
kind: non-void expression
1582+
comment: |
1583+
Represents the value being assigned.
1584+
1585+
foo.bar += value
1586+
^^^^^
15471587
comment: |
15481588
Represents the use of an assignment operator on a call.
15491589

0 commit comments

Comments
 (0)