You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config.yml
+25
Original file line number
Diff line number
Diff line change
@@ -2085,8 +2085,33 @@ nodes:
2085
2085
fields:
2086
2086
- name: name
2087
2087
type: constant
2088
+
comment: |
2089
+
The name of the local variable. Local variable names begin with an
2090
+
underscore or a lower-case letter, followed by arbitrarily many
2091
+
underscores, alphanumeric or non-ASCII characters. The exact
2092
+
definitions of "lower-case", "alphabetical" and "alphanumeric" are
2093
+
encoding-dependent.
2094
+
2095
+
x # name `:x`
2096
+
2097
+
_Test # name `:_Test`
2098
+
2099
+
🌯 # name `:🌯`
2088
2100
- name: depth
2089
2101
type: uint32
2102
+
comment: |
2103
+
The number of visible scopes searched up to find the declaration of
2104
+
this local variable.
2105
+
2106
+
foo = 1; foo # depth 0
2107
+
2108
+
bar = 2; tap { bar } # depth 1
2109
+
2110
+
The specific rules for calculating the depth may differ from
2111
+
individual Ruby implementations, as they are not specified by the
2112
+
language.
2113
+
2114
+
For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md).
2090
2115
comment: |
2091
2116
Represents reading a local variable. Note that this requires that a local
2092
2117
variable of the same name has already been written to in the same scope,
0 commit comments