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: prism/config.yml
+33-78Lines changed: 33 additions & 78 deletions
Original file line number
Diff line number
Diff line change
@@ -476,8 +476,7 @@ nodes:
476
476
- name: left
477
477
type: node
478
478
comment: |
479
-
Represents the left side of the expression. It can be any kind of node
480
-
that represents a non-void expression.
479
+
Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
481
480
482
481
left and right
483
482
^^^^
@@ -487,8 +486,7 @@ nodes:
487
486
- name: right
488
487
type: node
489
488
comment: |
490
-
Represents the right side of the expression. It can be any kind of
491
-
node that represents a non-void expression.
489
+
Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
492
490
493
491
left && right
494
492
^^^^^
@@ -531,8 +529,7 @@ nodes:
531
529
- name: closing_loc
532
530
type: location?
533
531
comment: |
534
-
Represents an array literal. This can be a regular array using brackets or
535
-
a special array using % like %w or %i.
532
+
Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.
536
533
537
534
[1, 2, 3]
538
535
^^^^^^^^^
@@ -572,8 +569,7 @@ nodes:
572
569
- name: key
573
570
type: node
574
571
comment: |
575
-
The key of the association. This can be any node that represents a
576
-
non-void expression.
572
+
The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
577
573
578
574
{ a: b }
579
575
^
@@ -586,9 +582,7 @@ nodes:
586
582
- name: value
587
583
type: node?
588
584
comment: |
589
-
The value of the association, if present. This can be any node that
590
-
represents a non-void expression. It can be optionally omitted if this
591
-
node is an element in a `HashPatternNode`.
585
+
The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It can be optionally omitted if this node is an element in a `HashPatternNode`.
592
586
593
587
{ foo => bar }
594
588
^^^
@@ -612,8 +606,7 @@ nodes:
612
606
- name: value
613
607
type: node?
614
608
comment: |
615
-
The value to be splatted, if present. Will be missing when keyword
616
-
rest argument forwarding is used.
609
+
The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used.
617
610
618
611
{ **foo }
619
612
^^^
@@ -793,9 +786,7 @@ nodes:
793
786
- name: receiver
794
787
type: node?
795
788
comment: |
796
-
The object that the method is being called on. This can be either
797
-
`nil` or a node representing any kind of expression that returns a
798
-
non-void value.
789
+
The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
799
790
800
791
foo.bar
801
792
^^^
@@ -1044,8 +1035,7 @@ nodes:
1044
1035
- name: name
1045
1036
type: constant
1046
1037
comment: |
1047
-
The name of the class variable, which is a `@@` followed by an
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).
1049
1039
1050
1040
@@abc # name `:@@abc`
1051
1041
@@ -1236,8 +1226,7 @@ nodes:
1236
1226
- name: name
1237
1227
type: constant
1238
1228
comment: |
1239
-
Represents writing to a constant in a context that doesn't have an
1240
-
explicit value.
1229
+
Represents writing to a constant in a context that doesn't have an explicit value.
1241
1230
1242
1231
Foo, Bar = baz
1243
1232
^^^ ^^^
@@ -1515,10 +1504,7 @@ nodes:
1515
1504
- name: name
1516
1505
type: constant
1517
1506
comment: |
1518
-
The name of the global variable, which is a `$` followed by an
Alternatively, it can be one of the special global variables designated
1521
-
by a symbol.
1507
+
The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol.
1522
1508
1523
1509
$foo # name `:$foo`
1524
1510
@@ -1641,8 +1627,7 @@ nodes:
1641
1627
- name: value
1642
1628
type: node
1643
1629
comment: |
1644
-
Represents a node that is implicitly being added to the tree but doesn't
1645
-
correspond directly to a node in the source.
1630
+
Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source.
1646
1631
1647
1632
{ foo: }
1648
1633
^^^^
@@ -1844,8 +1829,7 @@ nodes:
1844
1829
- name: name
1845
1830
type: constant
1846
1831
comment: |
1847
-
The name of the instance variable, which is a `@` followed by an
The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
1849
1833
1850
1834
@x # name `:@x`
1851
1835
@@ -1902,9 +1886,7 @@ nodes:
1902
1886
type: location
1903
1887
newline: parts
1904
1888
comment: |
1905
-
Represents a regular expression literal that contains interpolation that
1906
-
is being used in the predicate of a conditional to implicitly match
1907
-
against the last line read by an IO object.
1889
+
Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object.
The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
2080
2061
2081
2062
x # name `:x`
2082
2063
2083
2064
_Test # name `:_Test`
2084
2065
2085
-
Note that this can also be an underscore followed by a number for the
2086
-
default block parameters.
2066
+
Note that this can also be an underscore followed by a number for the default block parameters.
2087
2067
2088
2068
_1 # name `:_1`
2089
2069
2090
-
Finally, for the default `it` block parameter, the name is `0it`. This
2091
-
is to distinguish it from an `it` local variable that is explicitly
2092
-
declared.
2070
+
Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared.
2093
2071
2094
2072
it # name `:0it`
2095
2073
2096
2074
- name: depth
2097
2075
type: uint32
2098
2076
comment: |
2099
-
The number of visible scopes that should be searched to find the
2100
-
origin of this local variable.
2077
+
The number of visible scopes that should be searched to find the origin of this local variable.
2101
2078
2102
2079
foo = 1; foo # depth 0
2103
2080
2104
2081
bar = 2; tap { bar } # depth 1
2105
2082
2106
-
The specific rules for calculating the depth may differ from
2107
-
individual Ruby implementations, as they are not specified by the
2108
-
language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md).
2083
+
The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md).
2109
2084
comment: |
2110
-
Represents reading a local variable. Note that this requires that a local
2111
-
variable of the same name has already been written to in the same scope,
2112
-
otherwise it is parsed as a method call.
2085
+
Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call.
2113
2086
2114
2087
foo
2115
2088
^^^
@@ -2155,9 +2128,7 @@ nodes:
2155
2128
- name: unescaped
2156
2129
type: string
2157
2130
comment: |
2158
-
Represents a regular expression literal used in the predicate of a
2159
-
conditional to implicitly match against the last line read by an IO
2160
-
object.
2131
+
Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object.
2161
2132
2162
2133
if /foo/i then end
2163
2134
^^^^^^
@@ -2195,15 +2166,13 @@ nodes:
2195
2166
- name: targets
2196
2167
type: node[]
2197
2168
comment: |
2198
-
Represents writing local variables using a regular expression match with
2199
-
named capture groups.
2169
+
Represents writing local variables using a regular expression match with named capture groups.
2200
2170
2201
2171
/(?<foo>bar)/ =~ baz
2202
2172
^^^^^^^^^^^^^^^^^^^^
2203
2173
- name: MissingNode
2204
2174
comment: |
2205
-
Represents a node that is missing from the source and results in a syntax
2206
-
error.
2175
+
Represents a node that is missing from the source and results in a syntax error.
2207
2176
- name: ModuleNode
2208
2177
fields:
2209
2178
- name: locals
@@ -2296,8 +2265,7 @@ nodes:
2296
2265
- name: maximum
2297
2266
type: uint8
2298
2267
comment: |
2299
-
Represents an implicit set of parameters through the use of numbered
2300
-
parameters within a block or lambda.
2268
+
Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
2301
2269
2302
2270
-> { _1 + _2 }
2303
2271
^^^^^^^^^^^^^^
@@ -2306,9 +2274,7 @@ nodes:
2306
2274
- name: number
2307
2275
type: uint32
2308
2276
comment: |
2309
-
The (1-indexed, from the left) number of the capture group. Numbered
2310
-
references that would overflow a `uint32` result in a `number` of
2311
-
exactly `2**32 - 1`.
2277
+
The (1-indexed, from the left) number of the capture group. Numbered references that would overflow a `uint32` result in a `number` of exactly `2**32 - 1`.
2312
2278
2313
2279
$1 # number `1`
2314
2280
@@ -2361,8 +2327,7 @@ nodes:
2361
2327
- name: left
2362
2328
type: node
2363
2329
comment: |
2364
-
Represents the left side of the expression. It can be any kind of node
2365
-
that represents a non-void expression.
2330
+
Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
2366
2331
2367
2332
left or right
2368
2333
^^^^
@@ -2372,8 +2337,7 @@ nodes:
2372
2337
- name: right
2373
2338
type: node
2374
2339
comment: |
2375
-
Represents the right side of the expression. It can be any kind of
2376
-
node that represents a non-void expression.
2340
+
Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
2377
2341
2378
2342
left || right
2379
2343
^^^^^
@@ -2440,8 +2404,7 @@ nodes:
2440
2404
- name: rparen_loc
2441
2405
type: location
2442
2406
comment: |
2443
-
Represents the use of the `^` operator for pinning an expression in a
2444
-
pattern matching expression.
2407
+
Represents the use of the `^` operator for pinning an expression in a pattern matching expression.
2445
2408
2446
2409
foo in ^(bar)
2447
2410
^^^^^^
@@ -2452,8 +2415,7 @@ nodes:
2452
2415
- name: operator_loc
2453
2416
type: location
2454
2417
comment: |
2455
-
Represents the use of the `^` operator for pinning a variable in a pattern
2456
-
matching expression.
2418
+
Represents the use of the `^` operator for pinning a variable in a pattern matching expression.
2457
2419
2458
2420
foo in ^bar
2459
2421
^^^^
@@ -2505,9 +2467,7 @@ nodes:
2505
2467
- name: left
2506
2468
type: node?
2507
2469
comment: |
2508
-
The left-hand side of the range, if present. Can be either `nil` or
2509
-
a node representing any kind of expression that returns a non-void
2510
-
value.
2470
+
The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
2511
2471
2512
2472
1...
2513
2473
^
@@ -2517,17 +2477,14 @@ nodes:
2517
2477
- name: right
2518
2478
type: node?
2519
2479
comment: |
2520
-
The right-hand side of the range, if present. Can be either `nil` or
2521
-
a node representing any kind of expression that returns a non-void
2522
-
value.
2480
+
The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
2523
2481
2524
2482
..5
2525
2483
^
2526
2484
2527
2485
1...foo
2528
2486
^^^
2529
-
If neither right-hand or left-hand side was included, this will be a
2530
-
MissingNode.
2487
+
If neither right-hand or left-hand side was included, this will be a MissingNode.
2531
2488
- name: operator_loc
2532
2489
type: location
2533
2490
comment: |
@@ -2640,8 +2597,7 @@ nodes:
2640
2597
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2641
2598
end
2642
2599
2643
-
`Foo, *splat, Bar` are in the `exceptions` field.
2644
-
`ex` is in the `exception` field.
2600
+
`Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field.
2645
2601
- name: RestParameterNode
2646
2602
fields:
2647
2603
- name: flags
@@ -2757,8 +2713,7 @@ nodes:
2757
2713
- name: unescaped
2758
2714
type: string
2759
2715
comment: |
2760
-
Represents a string literal, a string contained within a `%w` list, or
2761
-
plain string content within an interpolated string.
2716
+
Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string.
0 commit comments