Skip to content

Commit

Permalink
Add document ClassVariableAndWriteNode fields
Browse files Browse the repository at this point in the history
Partially: #2123
  • Loading branch information
ydah committed Dec 4, 2024
1 parent ff50a14 commit 7be164e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1787,13 +1787,33 @@ nodes:
fields:
- name: name
type: constant
comment: |
The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
@@target &&= value # name `:@@target`
^^^^^^^^
- name: name_loc
type: location
comment: |
Represents the location of the variable name.
@@target &&= value
^^^^^^^^
- name: operator_loc
type: location
comment: |
Represents the location of the `&&=` operator.
@@target &&= value
^^^
- name: value
type: node
kind: non-void expression
comment: |
Represents the value being assigned. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
@@target &&= value
^^^^^
comment: |
Represents the use of the `&&=` operator for assignment to a class variable.
Expand Down

0 comments on commit 7be164e

Please sign in to comment.