diff options
| author | ydah <t.yudai92@gmail.com> | 2024-12-04 02:50:01 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-12-03 19:29:56 +0000 |
| commit | 917f348a0c2b956f2d5bbb1abdce878a595844e3 (patch) | |
| tree | 4d2a34847e4f94f39c9bb53d7f5a5d83f3fd752b | |
| parent | 0f921cf41dc0bb6c0846988e78cef0d2dce9e871 (diff) | |
[ruby/prism] Add document CallOrWriteNode fields
Partially: https://github.com/ruby/prism/issues/2123
https://github.com/ruby/prism/commit/3c01cc7c77
| -rw-r--r-- | prism/config.yml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml index 83413b0aee..0c8b01d2a9 100644 --- a/prism/config.yml +++ b/prism/config.yml @@ -1555,19 +1555,54 @@ nodes: - name: receiver type: node? kind: non-void expression + comment: | + 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). + + foo.bar ||= value + ^^^ - name: call_operator_loc type: location? + comment: | + Represents the location of the call operator. + + foo.bar ||= value + ^ - name: message_loc type: location? + comment: | + Represents the location of the message. + + foo.bar ||= value + ^^^ - name: read_name type: constant + comment: | + Represents the name of the method being called. + + foo.bar ||= value # read_name `:bar` + ^^^ - name: write_name type: constant + comment: | + Represents the name of the method being written to. + + foo.bar ||= value # write_name `:bar=` + ^^^ - name: operator_loc type: location + comment: | + Represents the location of the operator. + + foo.bar ||= value + ^^^ - name: value type: node kind: non-void expression + comment: | + Represents the value being assigned. + + foo.bar ||= value + ^^^^^ comment: | Represents the use of the `||=` operator on a call. |
