diff options
author | ydah <[email protected]> | 2024-12-04 16:17:36 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-12-04 17:21:44 +0000 |
commit | 932897af0e784d19ff508d45f473dd4d78f7149e (patch) | |
tree | b4b222f1c5e69b39327396be0b5de2a058bc4bae | |
parent | 62b51d9ad7e42090d29ab48a1d5b7ad17313370b (diff) |
[ruby/prism] Add document ClassVariableAndWriteNode fields
Partially: https://github.com/ruby/prism/issues/2123
https://github.com/ruby/prism/commit/7be164e0b7
-rw-r--r-- | prism/config.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml index 8eff98deab..dec6958403 100644 --- a/prism/config.yml +++ b/prism/config.yml @@ -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. |