From 7be164e0b737ba39324418f412f84b373988da41 Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 4 Dec 2024 16:17:36 +0900 Subject: [PATCH] Add document ClassVariableAndWriteNode fields Partially: https://github.com/ruby/prism/issues/2123 --- config.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config.yml b/config.yml index ac8c83f688..874f37a60c 100644 --- a/config.yml +++ b/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.