Skip to content

Commit 400341a

Browse files
committed
[PRISM] Sync to latest
1 parent 5a5cf23 commit 400341a

File tree

1 file changed

+33
-78
lines changed

1 file changed

+33
-78
lines changed

prism/config.yml

Lines changed: 33 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,7 @@ nodes:
476476
- name: left
477477
type: node
478478
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).
481480
482481
left and right
483482
^^^^
@@ -487,8 +486,7 @@ nodes:
487486
- name: right
488487
type: node
489488
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).
492490
493491
left && right
494492
^^^^^
@@ -531,8 +529,7 @@ nodes:
531529
- name: closing_loc
532530
type: location?
533531
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.
536533
537534
[1, 2, 3]
538535
^^^^^^^^^
@@ -572,8 +569,7 @@ nodes:
572569
- name: key
573570
type: node
574571
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).
577573
578574
{ a: b }
579575
^
@@ -586,9 +582,7 @@ nodes:
586582
- name: value
587583
type: node?
588584
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`.
592586
593587
{ foo => bar }
594588
^^^
@@ -612,8 +606,7 @@ nodes:
612606
- name: value
613607
type: node?
614608
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.
617610
618611
{ **foo }
619612
^^^
@@ -793,9 +786,7 @@ nodes:
793786
- name: receiver
794787
type: node?
795788
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).
799790
800791
foo.bar
801792
^^^
@@ -1044,8 +1035,7 @@ nodes:
10441035
- name: name
10451036
type: constant
10461037
comment: |
1047-
The name of the class variable, which is a `@@` followed by an
1048-
[identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
1038+
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).
10491039
10501040
@@abc # name `:@@abc`
10511041
@@ -1236,8 +1226,7 @@ nodes:
12361226
- name: name
12371227
type: constant
12381228
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.
12411230
12421231
Foo, Bar = baz
12431232
^^^ ^^^
@@ -1515,10 +1504,7 @@ nodes:
15151504
- name: name
15161505
type: constant
15171506
comment: |
1518-
The name of the global variable, which is a `$` followed by an
1519-
[identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier).
1520-
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.
15221508
15231509
$foo # name `:$foo`
15241510
@@ -1641,8 +1627,7 @@ nodes:
16411627
- name: value
16421628
type: node
16431629
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.
16461631
16471632
{ foo: }
16481633
^^^^
@@ -1844,8 +1829,7 @@ nodes:
18441829
- name: name
18451830
type: constant
18461831
comment: |
1847-
The name of the instance variable, which is a `@` followed by an
1848-
[identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
1832+
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).
18491833
18501834
@x # name `:@x`
18511835
@@ -1902,9 +1886,7 @@ nodes:
19021886
type: location
19031887
newline: parts
19041888
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.
19081890
19091891
if /foo #{bar} baz/ then end
19101892
^^^^^^^^^^^^^^^^
@@ -2075,41 +2057,32 @@ nodes:
20752057
- name: name
20762058
type: constant
20772059
comment: |
2078-
The name of the local variable, which is an
2079-
[identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
2060+
The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
20802061
20812062
x # name `:x`
20822063
20832064
_Test # name `:_Test`
20842065
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.
20872067
20882068
_1 # name `:_1`
20892069
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.
20932071
20942072
it # name `:0it`
20952073
20962074
- name: depth
20972075
type: uint32
20982076
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.
21012078
21022079
foo = 1; foo # depth 0
21032080
21042081
bar = 2; tap { bar } # depth 1
21052082
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).
21092084
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.
21132086
21142087
foo
21152088
^^^
@@ -2155,9 +2128,7 @@ nodes:
21552128
- name: unescaped
21562129
type: string
21572130
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.
21612132
21622133
if /foo/i then end
21632134
^^^^^^
@@ -2195,15 +2166,13 @@ nodes:
21952166
- name: targets
21962167
type: node[]
21972168
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.
22002170
22012171
/(?<foo>bar)/ =~ baz
22022172
^^^^^^^^^^^^^^^^^^^^
22032173
- name: MissingNode
22042174
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.
22072176
- name: ModuleNode
22082177
fields:
22092178
- name: locals
@@ -2296,8 +2265,7 @@ nodes:
22962265
- name: maximum
22972266
type: uint8
22982267
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.
23012269
23022270
-> { _1 + _2 }
23032271
^^^^^^^^^^^^^^
@@ -2306,9 +2274,7 @@ nodes:
23062274
- name: number
23072275
type: uint32
23082276
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`.
23122278
23132279
$1 # number `1`
23142280
@@ -2361,8 +2327,7 @@ nodes:
23612327
- name: left
23622328
type: node
23632329
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).
23662331
23672332
left or right
23682333
^^^^
@@ -2372,8 +2337,7 @@ nodes:
23722337
- name: right
23732338
type: node
23742339
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).
23772341
23782342
left || right
23792343
^^^^^
@@ -2440,8 +2404,7 @@ nodes:
24402404
- name: rparen_loc
24412405
type: location
24422406
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.
24452408
24462409
foo in ^(bar)
24472410
^^^^^^
@@ -2452,8 +2415,7 @@ nodes:
24522415
- name: operator_loc
24532416
type: location
24542417
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.
24572419
24582420
foo in ^bar
24592421
^^^^
@@ -2505,9 +2467,7 @@ nodes:
25052467
- name: left
25062468
type: node?
25072469
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).
25112471
25122472
1...
25132473
^
@@ -2517,17 +2477,14 @@ nodes:
25172477
- name: right
25182478
type: node?
25192479
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).
25232481
25242482
..5
25252483
^
25262484
25272485
1...foo
25282486
^^^
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.
25312488
- name: operator_loc
25322489
type: location
25332490
comment: |
@@ -2640,8 +2597,7 @@ nodes:
26402597
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26412598
end
26422599
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.
26452601
- name: RestParameterNode
26462602
fields:
26472603
- name: flags
@@ -2757,8 +2713,7 @@ nodes:
27572713
- name: unescaped
27582714
type: string
27592715
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.
27622717
27632718
"foo"
27642719
^^^^^

0 commit comments

Comments
 (0)