Skip to content

Commit 82c6e8e

Browse files
authored
Merge pull request #3276 from ydah/doc-call-or-write
Add document CallOrWriteNode fields
2 parents 6f0271e + 3c01cc7 commit 82c6e8e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

config.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,19 +1555,54 @@ nodes:
15551555
- name: receiver
15561556
type: node?
15571557
kind: non-void expression
1558+
comment: |
1559+
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).
1560+
1561+
foo.bar ||= value
1562+
^^^
15581563
- name: call_operator_loc
15591564
type: location?
1565+
comment: |
1566+
Represents the location of the call operator.
1567+
1568+
foo.bar ||= value
1569+
^
15601570
- name: message_loc
15611571
type: location?
1572+
comment: |
1573+
Represents the location of the message.
1574+
1575+
foo.bar ||= value
1576+
^^^
15621577
- name: read_name
15631578
type: constant
1579+
comment: |
1580+
Represents the name of the method being called.
1581+
1582+
foo.bar ||= value # read_name `:bar`
1583+
^^^
15641584
- name: write_name
15651585
type: constant
1586+
comment: |
1587+
Represents the name of the method being written to.
1588+
1589+
foo.bar ||= value # write_name `:bar=`
1590+
^^^
15661591
- name: operator_loc
15671592
type: location
1593+
comment: |
1594+
Represents the location of the operator.
1595+
1596+
foo.bar ||= value
1597+
^^^
15681598
- name: value
15691599
type: node
15701600
kind: non-void expression
1601+
comment: |
1602+
Represents the value being assigned.
1603+
1604+
foo.bar ||= value
1605+
^^^^^
15711606
comment: |
15721607
Represents the use of the `||=` operator on a call.
15731608

0 commit comments

Comments
 (0)