diff options
author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-11-01 09:36:15 -0300 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-11-01 14:40:45 +0000 |
commit | e80ca70b9bd1ccfa319790475dc9c0dd125f4f0d (patch) | |
tree | 16e023bade33686bce3ad9b36e21816c57636745 | |
parent | d0625099e0f691f44fb4c796d8d497d818bf7c8e (diff) | |
download | ruby-e80ca70b9bd1ccfa319790475dc9c0dd125f4f0d.tar.gz |
[ruby/prism] Flip incorrect names of OptionalKeywordParameterNode and RequiredKeywordParameterNode
https://github.com/ruby/prism/commit/c31f61e898
37 files changed, 99 insertions, 99 deletions
diff --git a/lib/prism/debug.rb b/lib/prism/debug.rb index 34e0c43f49..bd2eb0842b 100644 --- a/lib/prism/debug.rb +++ b/lib/prism/debug.rb @@ -114,8 +114,8 @@ module Prism AnonymousLocal end end, - *params.keywords.select { |kw| kw.is_a? OptionalKeywordParameterNode }.map(&:name), - *params.keywords.select { |kw| kw.is_a? RequiredKeywordParameterNode }.map(&:name), + *params.keywords.grep(RequiredKeywordParameterNode).map(&:name), + *params.keywords.grep(OptionalKeywordParameterNode).map(&:name), ] sorted << AnonymousLocal if params.keywords.any? diff --git a/prism/config.yml b/prism/config.yml index 9e0b25553e..3446e277bc 100644 --- a/prism/config.yml +++ b/prism/config.yml @@ -1985,11 +1985,13 @@ nodes: type: constant - name: name_loc type: location + - name: value + type: node comment: | Represents an optional keyword parameter to a method, block, or lambda definition. - def a(b: ) - ^^ + def a(b: 1) + ^^^^ end - name: OptionalParameterNode fields: @@ -2184,13 +2186,11 @@ nodes: type: constant - name: name_loc type: location - - name: value - type: node comment: | Represents a required keyword parameter to a method, block, or lambda definition. - def a(b: 1) - ^^^^ + def a(b: ) + ^^ end - name: RequiredParameterNode fields: diff --git a/prism/prism.c b/prism/prism.c index 4dda06aedc..e663931477 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -3326,14 +3326,14 @@ pm_keyword_hash_node_elements_append(pm_keyword_hash_node_t *hash, pm_node_t *el hash->base.location.end = element->location.end; } -// Allocate a new OptionalKeywordParameterNode node. -static pm_optional_keyword_parameter_node_t * -pm_optional_keyword_parameter_node_create(pm_parser_t *parser, const pm_token_t *name) { - pm_optional_keyword_parameter_node_t *node = PM_ALLOC_NODE(parser, pm_optional_keyword_parameter_node_t); +// Allocate a new RequiredKeywordParameterNode node. +static pm_required_keyword_parameter_node_t * +pm_required_keyword_parameter_node_create(pm_parser_t *parser, const pm_token_t *name) { + pm_required_keyword_parameter_node_t *node = PM_ALLOC_NODE(parser, pm_required_keyword_parameter_node_t); - *node = (pm_optional_keyword_parameter_node_t) { + *node = (pm_required_keyword_parameter_node_t) { { - .type = PM_OPTIONAL_KEYWORD_PARAMETER_NODE, + .type = PM_REQUIRED_KEYWORD_PARAMETER_NODE, .location = { .start = name->start, .end = name->end @@ -3346,14 +3346,14 @@ pm_optional_keyword_parameter_node_create(pm_parser_t *parser, const pm_token_t return node; } -// Allocate a new RequiredKeywordParameterNode node. -static pm_required_keyword_parameter_node_t * -pm_required_keyword_parameter_node_create(pm_parser_t *parser, const pm_token_t *name, pm_node_t *value) { - pm_required_keyword_parameter_node_t *node = PM_ALLOC_NODE(parser, pm_required_keyword_parameter_node_t); +// Allocate a new OptionalKeywordParameterNode node. +static pm_optional_keyword_parameter_node_t * +pm_optional_keyword_parameter_node_create(pm_parser_t *parser, const pm_token_t *name, pm_node_t *value) { + pm_optional_keyword_parameter_node_t *node = PM_ALLOC_NODE(parser, pm_optional_keyword_parameter_node_t); - *node = (pm_required_keyword_parameter_node_t) { + *node = (pm_optional_keyword_parameter_node_t) { { - .type = PM_REQUIRED_KEYWORD_PARAMETER_NODE, + .type = PM_OPTIONAL_KEYWORD_PARAMETER_NODE, .location = { .start = name->start, .end = value->location.end @@ -10502,7 +10502,7 @@ parse_parameters( case PM_TOKEN_COMMA: case PM_TOKEN_PARENTHESIS_RIGHT: case PM_TOKEN_PIPE: { - pm_node_t *param = (pm_node_t *) pm_optional_keyword_parameter_node_create(parser, &name); + pm_node_t *param = (pm_node_t *) pm_required_keyword_parameter_node_create(parser, &name); pm_parameters_node_keywords_append(params, param); break; } @@ -10513,7 +10513,7 @@ parse_parameters( break; } - pm_node_t *param = (pm_node_t *) pm_optional_keyword_parameter_node_create(parser, &name); + pm_node_t *param = (pm_node_t *) pm_required_keyword_parameter_node_create(parser, &name); pm_parameters_node_keywords_append(params, param); break; } @@ -10524,10 +10524,10 @@ parse_parameters( context_push(parser, PM_CONTEXT_DEFAULT_PARAMS); pm_node_t *value = parse_expression(parser, binding_power, PM_ERR_PARAMETER_NO_DEFAULT_KW); context_pop(parser); - param = (pm_node_t *) pm_required_keyword_parameter_node_create(parser, &name, value); + param = (pm_node_t *) pm_optional_keyword_parameter_node_create(parser, &name, value); } else { - param = (pm_node_t *) pm_optional_keyword_parameter_node_create(parser, &name); + param = (pm_node_t *) pm_required_keyword_parameter_node_create(parser, &name); } pm_parameters_node_keywords_append(params, param); diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb index 604311abe4..726bb14303 100644 --- a/test/prism/errors_test.rb +++ b/test/prism/errors_test.rb @@ -746,7 +746,7 @@ module Prism [], nil, [RequiredParameterNode(:a)], - [OptionalKeywordParameterNode(:b, Location())], + [RequiredKeywordParameterNode(:b, Location())], nil, nil ), @@ -774,7 +774,7 @@ module Prism [], nil, [], - [OptionalKeywordParameterNode(:b, Location())], + [RequiredKeywordParameterNode(:b, Location())], KeywordRestParameterNode(:rest, Location(), Location()), nil ), @@ -824,7 +824,7 @@ module Prism [], nil, [RequiredParameterNode(:a)], - [OptionalKeywordParameterNode(:b, Location())], + [RequiredKeywordParameterNode(:b, Location())], KeywordRestParameterNode(:args, Location(), Location()), nil ), @@ -854,7 +854,7 @@ module Prism [], nil, [RequiredParameterNode(:a)], - [OptionalKeywordParameterNode(:b, Location())], + [RequiredKeywordParameterNode(:b, Location())], KeywordRestParameterNode(:args, Location(), Location()), nil ), @@ -884,7 +884,7 @@ module Prism [], nil, [RequiredParameterNode(:a)], - [OptionalKeywordParameterNode(:b, Location())], + [RequiredKeywordParameterNode(:b, Location())], KeywordRestParameterNode(:args, Location(), Location()), nil ), diff --git a/test/prism/location_test.rb b/test/prism/location_test.rb index aa130abd5f..363e96fae8 100644 --- a/test/prism/location_test.rb +++ b/test/prism/location_test.rb @@ -600,7 +600,7 @@ module Prism end def test_OptionalKeywordParameterNode - assert_location(OptionalKeywordParameterNode, "def foo(bar:); end", 8...12) do |node| + assert_location(OptionalKeywordParameterNode, "def foo(bar: nil); end", 8...16) do |node| node.parameters.keywords.first end end @@ -670,7 +670,7 @@ module Prism end def test_RequiredKeywordParameterNode - assert_location(RequiredKeywordParameterNode, "def foo(bar: nil); end", 8...16) do |node| + assert_location(RequiredKeywordParameterNode, "def foo(bar:); end", 8...12) do |node| node.parameters.keywords.first end end diff --git a/test/prism/snapshots/blocks.txt b/test/prism/snapshots/blocks.txt index 0cf7f693de..9769e9e4e2 100644 --- a/test/prism/snapshots/blocks.txt +++ b/test/prism/snapshots/blocks.txt @@ -517,7 +517,7 @@ │ │ │ │ ├── rest: ∅ │ │ │ │ ├── posts: (length: 0) │ │ │ │ ├── keywords: (length: 1) - │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (33,17)-(33,19)) + │ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (33,17)-(33,19)) │ │ │ │ │ ├── name: :z │ │ │ │ │ └── name_loc: (33,17)-(33,19) = "z:" │ │ │ │ ├── keyword_rest: ∅ @@ -695,13 +695,13 @@ │ │ │ │ │ │ ├── rest: ∅ │ │ │ │ │ │ ├── posts: (length: 0) │ │ │ │ │ │ ├── keywords: (length: 2) - │ │ │ │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (49,2)-(49,6)) + │ │ │ │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (49,2)-(49,6)) │ │ │ │ │ │ │ │ ├── name: :a │ │ │ │ │ │ │ │ ├── name_loc: (49,2)-(49,4) = "a:" │ │ │ │ │ │ │ │ └── value: │ │ │ │ │ │ │ │ @ IntegerNode (location: (49,5)-(49,6)) │ │ │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (50,2)-(50,6)) + │ │ │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (50,2)-(50,6)) │ │ │ │ │ │ │ ├── name: :b │ │ │ │ │ │ │ ├── name_loc: (50,2)-(50,4) = "b:" │ │ │ │ │ │ │ └── value: diff --git a/test/prism/snapshots/lambda.txt b/test/prism/snapshots/lambda.txt index c2442d546c..270594d714 100644 --- a/test/prism/snapshots/lambda.txt +++ b/test/prism/snapshots/lambda.txt @@ -39,7 +39,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (5,3)-(5,13)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (5,3)-(5,13)) │ │ │ │ ├── name: :x │ │ │ │ ├── name_loc: (5,3)-(5,5) = "x:" │ │ │ │ └── value: @@ -89,7 +89,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (7,3)-(7,11)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (7,3)-(7,11)) │ │ │ │ ├── name: :a │ │ │ │ ├── name_loc: (7,3)-(7,5) = "a:" │ │ │ │ └── value: @@ -173,7 +173,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (11,3)-(11,11)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (11,3)-(11,11)) │ │ │ ├── name: :foo │ │ │ ├── name_loc: (11,3)-(11,7) = "foo:" │ │ │ └── value: diff --git a/test/prism/snapshots/methods.txt b/test/prism/snapshots/methods.txt index 69d1c0ecec..ebaeb839c1 100644 --- a/test/prism/snapshots/methods.txt +++ b/test/prism/snapshots/methods.txt @@ -260,7 +260,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ OptionalKeywordParameterNode (location: (31,6)-(31,8)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (31,6)-(31,8)) │ │ │ ├── name: :b │ │ │ └── name_loc: (31,6)-(31,8) = "b:" │ │ ├── keyword_rest: ∅ @@ -290,7 +290,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ OptionalKeywordParameterNode (location: (35,6)-(35,8)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (35,6)-(35,8)) │ │ │ ├── name: :b │ │ │ └── name_loc: (35,6)-(35,8) = "b:" │ │ ├── keyword_rest: ∅ @@ -426,10 +426,10 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 2) - │ │ │ ├── @ OptionalKeywordParameterNode (location: (53,6)-(53,8)) + │ │ │ ├── @ RequiredKeywordParameterNode (location: (53,6)-(53,8)) │ │ │ │ ├── name: :b │ │ │ │ └── name_loc: (53,6)-(53,8) = "b:" - │ │ │ └── @ RequiredKeywordParameterNode (location: (53,10)-(53,14)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (53,10)-(53,14)) │ │ │ ├── name: :c │ │ │ ├── name_loc: (53,10)-(53,12) = "c:" │ │ │ └── value: @@ -456,10 +456,10 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 2) - │ │ │ ├── @ OptionalKeywordParameterNode (location: (56,6)-(56,8)) + │ │ │ ├── @ RequiredKeywordParameterNode (location: (56,6)-(56,8)) │ │ │ │ ├── name: :b │ │ │ │ └── name_loc: (56,6)-(56,8) = "b:" - │ │ │ └── @ RequiredKeywordParameterNode (location: (56,10)-(56,14)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (56,10)-(56,14)) │ │ │ ├── name: :c │ │ │ ├── name_loc: (56,10)-(56,12) = "c:" │ │ │ └── value: @@ -486,13 +486,13 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 2) - │ │ │ ├── @ RequiredKeywordParameterNode (location: (59,6)-(60,3)) + │ │ │ ├── @ OptionalKeywordParameterNode (location: (59,6)-(60,3)) │ │ │ │ ├── name: :b │ │ │ │ ├── name_loc: (59,6)-(59,8) = "b:" │ │ │ │ └── value: │ │ │ │ @ IntegerNode (location: (60,2)-(60,3)) │ │ │ │ └── flags: decimal - │ │ │ └── @ OptionalKeywordParameterNode (location: (60,5)-(60,7)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (60,5)-(60,7)) │ │ │ ├── name: :c │ │ │ └── name_loc: (60,5)-(60,7) = "c:" │ │ ├── keyword_rest: ∅ @@ -1307,7 +1307,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (142,8)-(142,19)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (142,8)-(142,19)) │ │ │ ├── name: :a │ │ │ ├── name_loc: (142,8)-(142,10) = "a:" │ │ │ └── value: @@ -1347,7 +1347,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (145,8)-(145,18)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (145,8)-(145,18)) │ │ │ ├── name: :a │ │ │ ├── name_loc: (145,8)-(145,10) = "a:" │ │ │ └── value: @@ -1385,7 +1385,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (148,8)-(148,17)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (148,8)-(148,17)) │ │ │ ├── name: :a │ │ │ ├── name_loc: (148,8)-(148,10) = "a:" │ │ │ └── value: diff --git a/test/prism/snapshots/procs.txt b/test/prism/snapshots/procs.txt index d704add3ea..c29c39fede 100644 --- a/test/prism/snapshots/procs.txt +++ b/test/prism/snapshots/procs.txt @@ -144,10 +144,10 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 2) - │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (17,13)-(17,15)) + │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (17,13)-(17,15)) │ │ │ │ │ ├── name: :c │ │ │ │ │ └── name_loc: (17,13)-(17,15) = "c:" - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (17,17)-(17,19)) + │ │ │ │ └── @ RequiredKeywordParameterNode (location: (17,17)-(17,19)) │ │ │ │ ├── name: :d │ │ │ │ └── name_loc: (17,17)-(17,19) = "d:" │ │ │ ├── keyword_rest: ∅ @@ -192,10 +192,10 @@ │ │ │ │ └── operator_loc: (19,14)-(19,15) = "*" │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 2) - │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (19,18)-(19,20)) + │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (19,18)-(19,20)) │ │ │ │ │ ├── name: :d │ │ │ │ │ └── name_loc: (19,18)-(19,20) = "d:" - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (19,22)-(19,24)) + │ │ │ │ └── @ RequiredKeywordParameterNode (location: (19,22)-(19,24)) │ │ │ │ ├── name: :e │ │ │ │ └── name_loc: (19,22)-(19,24) = "e:" │ │ │ ├── keyword_rest: @@ -244,10 +244,10 @@ │ │ │ │ └── operator_loc: (21,14)-(21,15) = "*" │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 2) - │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (21,18)-(21,20)) + │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (21,18)-(21,20)) │ │ │ │ │ ├── name: :d │ │ │ │ │ └── name_loc: (21,18)-(21,20) = "d:" - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (21,22)-(21,24)) + │ │ │ │ └── @ RequiredKeywordParameterNode (location: (21,22)-(21,24)) │ │ │ │ ├── name: :e │ │ │ │ └── name_loc: (21,22)-(21,24) = "e:" │ │ │ ├── keyword_rest: diff --git a/test/prism/snapshots/seattlerb/args_kw_block.txt b/test/prism/snapshots/seattlerb/args_kw_block.txt index 13ea25095d..8d4bc2be38 100644 --- a/test/prism/snapshots/seattlerb/args_kw_block.txt +++ b/test/prism/snapshots/seattlerb/args_kw_block.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,10)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10)) │ │ ├── name: :a │ │ ├── name_loc: (1,6)-(1,8) = "a:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/block_kw.txt b/test/prism/snapshots/seattlerb/block_kw.txt index db136d2ae6..629a88080c 100644 --- a/test/prism/snapshots/seattlerb/block_kw.txt +++ b/test/prism/snapshots/seattlerb/block_kw.txt @@ -22,7 +22,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,8)-(1,12)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,12)) │ │ │ │ ├── name: :k │ │ │ │ ├── name_loc: (1,8)-(1,10) = "k:" │ │ │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/block_kw__required.txt b/test/prism/snapshots/seattlerb/block_kw__required.txt index 7fdd0c4e1e..10ae4f5afb 100644 --- a/test/prism/snapshots/seattlerb/block_kw__required.txt +++ b/test/prism/snapshots/seattlerb/block_kw__required.txt @@ -22,7 +22,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,9)-(1,11)) + │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,9)-(1,11)) │ │ │ │ ├── name: :k │ │ │ │ └── name_loc: (1,9)-(1,11) = "k:" │ │ │ ├── keyword_rest: ∅ diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt index d574e83dea..8325437072 100644 --- a/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt +++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar.txt @@ -22,7 +22,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,14)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,14)) │ │ │ │ ├── name: :kw │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:" │ │ │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt index 10814a2bbc..9c9d0853ff 100644 --- a/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt +++ b/test/prism/snapshots/seattlerb/block_kwarg_lvar_multiple.txt @@ -22,7 +22,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 2) - │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (1,6)-(1,14)) + │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (1,6)-(1,14)) │ │ │ │ │ ├── name: :kw │ │ │ │ │ ├── name_loc: (1,6)-(1,9) = "kw:" │ │ │ │ │ └── value: @@ -31,7 +31,7 @@ │ │ │ │ │ ├── value_loc: (1,11)-(1,14) = "val" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "val" - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,16)-(1,26)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,16)-(1,26)) │ │ │ │ ├── name: :kw2 │ │ │ │ ├── name_loc: (1,16)-(1,20) = "kw2:" │ │ │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt index 7ec17b6f09..4ca746c224 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwarg.txt @@ -16,13 +16,13 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 2) - │ │ ├── @ RequiredKeywordParameterNode (location: (1,9)-(1,13)) + │ │ ├── @ OptionalKeywordParameterNode (location: (1,9)-(1,13)) │ │ │ ├── name: :b │ │ │ ├── name_loc: (1,9)-(1,11) = "b:" │ │ │ └── value: │ │ │ @ IntegerNode (location: (1,12)-(1,13)) │ │ │ └── flags: decimal - │ │ └── @ RequiredKeywordParameterNode (location: (1,15)-(1,19)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,15)-(1,19)) │ │ ├── name: :c │ │ ├── name_loc: (1,15)-(1,17) = "c:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt index b27e177824..5356f73143 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,10)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10)) │ │ ├── name: :b │ │ ├── name_loc: (1,6)-(1,8) = "b:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt index cfb8d3487f..4ccf1907f9 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,10)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10)) │ │ ├── name: :b │ │ ├── name_loc: (1,6)-(1,8) = "b:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt index 8af8ac4726..435c2f224c 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_lvar.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,8)-(1,16)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,8)-(1,16)) │ │ ├── name: :kw │ │ ├── name_loc: (1,8)-(1,11) = "kw:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt index 3a5b9cd22a..6905bd1973 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_no_parens.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,10)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10)) │ │ ├── name: :a │ │ ├── name_loc: (1,6)-(1,8) = "a:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_val.txt b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt index 3ed748a6e5..772c7b6224 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_val.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_val.txt @@ -16,7 +16,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,9)-(1,12)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,9)-(1,12)) │ │ ├── name: :b │ │ ├── name_loc: (1,9)-(1,11) = "b:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/defs_kwarg.txt b/test/prism/snapshots/seattlerb/defs_kwarg.txt index 55f39c5543..62571e863d 100644 --- a/test/prism/snapshots/seattlerb/defs_kwarg.txt +++ b/test/prism/snapshots/seattlerb/defs_kwarg.txt @@ -15,7 +15,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,11)-(1,15)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,11)-(1,15)) │ │ ├── name: :b │ │ ├── name_loc: (1,11)-(1,13) = "b:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/f_kw.txt b/test/prism/snapshots/seattlerb/f_kw.txt index 3c1e5aa3a6..435f5547b8 100644 --- a/test/prism/snapshots/seattlerb/f_kw.txt +++ b/test/prism/snapshots/seattlerb/f_kw.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,10)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10)) │ │ ├── name: :k │ │ ├── name_loc: (1,6)-(1,8) = "k:" │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/f_kw__required.txt b/test/prism/snapshots/seattlerb/f_kw__required.txt index f0375459a6..62a17289bd 100644 --- a/test/prism/snapshots/seattlerb/f_kw__required.txt +++ b/test/prism/snapshots/seattlerb/f_kw__required.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,8)) + │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,8)) │ │ ├── name: :k │ │ └── name_loc: (1,6)-(1,8) = "k:" │ ├── keyword_rest: ∅ diff --git a/test/prism/snapshots/seattlerb/iter_kwarg.txt b/test/prism/snapshots/seattlerb/iter_kwarg.txt index d8e65d6a08..e80e6b599a 100644 --- a/test/prism/snapshots/seattlerb/iter_kwarg.txt +++ b/test/prism/snapshots/seattlerb/iter_kwarg.txt @@ -22,7 +22,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,5)-(1,9)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9)) │ │ │ │ ├── name: :b │ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:" │ │ │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt index 5e72568951..bd910e7d40 100644 --- a/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt +++ b/test/prism/snapshots/seattlerb/iter_kwarg_kwsplat.txt @@ -22,7 +22,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,5)-(1,9)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,5)-(1,9)) │ │ │ │ ├── name: :b │ │ │ │ ├── name_loc: (1,5)-(1,7) = "b:" │ │ │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt b/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt index 167db3a475..8c62ac7882 100644 --- a/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt +++ b/test/prism/snapshots/seattlerb/required_kwarg_no_value.txt @@ -14,10 +14,10 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 2) - │ │ ├── @ OptionalKeywordParameterNode (location: (1,6)-(1,8)) + │ │ ├── @ RequiredKeywordParameterNode (location: (1,6)-(1,8)) │ │ │ ├── name: :a │ │ │ └── name_loc: (1,6)-(1,8) = "a:" - │ │ └── @ OptionalKeywordParameterNode (location: (1,10)-(1,12)) + │ │ └── @ RequiredKeywordParameterNode (location: (1,10)-(1,12)) │ │ ├── name: :b │ │ └── name_loc: (1,10)-(1,12) = "b:" │ ├── keyword_rest: ∅ diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw.txt b/test/prism/snapshots/seattlerb/stabby_block_kw.txt index 1accc172de..fe95390a27 100644 --- a/test/prism/snapshots/seattlerb/stabby_block_kw.txt +++ b/test/prism/snapshots/seattlerb/stabby_block_kw.txt @@ -17,7 +17,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (1,4)-(1,8)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (1,4)-(1,8)) │ │ │ ├── name: :k │ │ │ ├── name_loc: (1,4)-(1,6) = "k:" │ │ │ └── value: diff --git a/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt b/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt index 2754fa1b79..99a2e70586 100644 --- a/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt +++ b/test/prism/snapshots/seattlerb/stabby_block_kw__required.txt @@ -17,7 +17,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ OptionalKeywordParameterNode (location: (1,4)-(1,6)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (1,4)-(1,6)) │ │ │ ├── name: :k │ │ │ └── name_loc: (1,4)-(1,6) = "k:" │ │ ├── keyword_rest: ∅ diff --git a/test/prism/snapshots/unparser/corpus/literal/def.txt b/test/prism/snapshots/unparser/corpus/literal/def.txt index 837cd1d368..daafd10664 100644 --- a/test/prism/snapshots/unparser/corpus/literal/def.txt +++ b/test/prism/snapshots/unparser/corpus/literal/def.txt @@ -194,10 +194,10 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 2) - │ │ │ ├── @ OptionalKeywordParameterNode (location: (21,8)-(21,12)) + │ │ │ ├── @ RequiredKeywordParameterNode (location: (21,8)-(21,12)) │ │ │ │ ├── name: :bar │ │ │ │ └── name_loc: (21,8)-(21,12) = "bar:" - │ │ │ └── @ OptionalKeywordParameterNode (location: (21,14)-(21,18)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (21,14)-(21,18)) │ │ │ ├── name: :baz │ │ │ └── name_loc: (21,14)-(21,18) = "baz:" │ │ ├── keyword_rest: ∅ @@ -627,7 +627,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (74,8)-(74,14)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (74,8)-(74,14)) │ │ │ ├── name: :bar │ │ │ ├── name_loc: (74,8)-(74,12) = "bar:" │ │ │ └── value: @@ -654,7 +654,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (77,8)-(77,16)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (77,8)-(77,16)) │ │ │ ├── name: :bar │ │ │ ├── name_loc: (77,8)-(77,12) = "bar:" │ │ │ └── value: @@ -689,7 +689,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (80,8)-(80,18)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (80,8)-(80,18)) │ │ │ ├── name: :bar │ │ │ ├── name_loc: (80,8)-(80,12) = "bar:" │ │ │ └── value: @@ -1090,10 +1090,10 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 2) - │ │ │ ├── @ OptionalKeywordParameterNode (location: (123,8)-(123,12)) + │ │ │ ├── @ RequiredKeywordParameterNode (location: (123,8)-(123,12)) │ │ │ │ ├── name: :bar │ │ │ │ └── name_loc: (123,8)-(123,12) = "bar:" - │ │ │ └── @ RequiredKeywordParameterNode (location: (123,14)-(123,26)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (123,14)-(123,26)) │ │ │ ├── name: :baz │ │ │ ├── name_loc: (123,14)-(123,18) = "baz:" │ │ │ └── value: diff --git a/test/prism/snapshots/whitequark/args.txt b/test/prism/snapshots/whitequark/args.txt index bc9d42da70..5c593ddc7b 100644 --- a/test/prism/snapshots/whitequark/args.txt +++ b/test/prism/snapshots/whitequark/args.txt @@ -369,7 +369,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (23,7)-(23,13)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (23,7)-(23,13)) │ │ │ ├── name: :foo │ │ │ ├── name_loc: (23,7)-(23,11) = "foo:" │ │ │ └── value: @@ -400,13 +400,13 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 2) - │ │ │ ├── @ RequiredKeywordParameterNode (location: (25,7)-(25,13)) + │ │ │ ├── @ OptionalKeywordParameterNode (location: (25,7)-(25,13)) │ │ │ │ ├── name: :foo │ │ │ │ ├── name_loc: (25,7)-(25,11) = "foo:" │ │ │ │ └── value: │ │ │ │ @ IntegerNode (location: (25,12)-(25,13)) │ │ │ │ └── flags: decimal - │ │ │ └── @ RequiredKeywordParameterNode (location: (25,15)-(25,21)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (25,15)-(25,21)) │ │ │ ├── name: :bar │ │ │ ├── name_loc: (25,15)-(25,19) = "bar:" │ │ │ └── value: @@ -811,7 +811,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ OptionalKeywordParameterNode (location: (51,6)-(51,10)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (51,6)-(51,10)) │ │ │ ├── name: :foo │ │ │ └── name_loc: (51,6)-(51,10) = "foo:" │ │ ├── keyword_rest: ∅ @@ -835,7 +835,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ RequiredKeywordParameterNode (location: (54,6)-(54,13)) + │ │ │ └── @ OptionalKeywordParameterNode (location: (54,6)-(54,13)) │ │ │ ├── name: :foo │ │ │ ├── name_loc: (54,6)-(54,10) = "foo:" │ │ │ └── value: diff --git a/test/prism/snapshots/whitequark/blockargs.txt b/test/prism/snapshots/whitequark/blockargs.txt index 208e2bf333..ec0296813f 100644 --- a/test/prism/snapshots/whitequark/blockargs.txt +++ b/test/prism/snapshots/whitequark/blockargs.txt @@ -963,7 +963,7 @@ │ │ │ │ ├── rest: ∅ │ │ │ │ ├── posts: (length: 0) │ │ │ │ ├── keywords: (length: 1) - │ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (57,4)-(57,10)) + │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (57,4)-(57,10)) │ │ │ │ │ ├── name: :foo │ │ │ │ │ ├── name_loc: (57,4)-(57,8) = "foo:" │ │ │ │ │ └── value: @@ -1002,13 +1002,13 @@ │ │ │ │ ├── rest: ∅ │ │ │ │ ├── posts: (length: 0) │ │ │ │ ├── keywords: (length: 2) - │ │ │ │ │ ├── @ RequiredKeywordParameterNode (location: (59,4)-(59,10)) + │ │ │ │ │ ├── @ OptionalKeywordParameterNode (location: (59,4)-(59,10)) │ │ │ │ │ │ ├── name: :foo │ │ │ │ │ │ ├── name_loc: (59,4)-(59,8) = "foo:" │ │ │ │ │ │ └── value: │ │ │ │ │ │ @ IntegerNode (location: (59,9)-(59,10)) │ │ │ │ │ │ └── flags: decimal - │ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (59,12)-(59,18)) + │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (59,12)-(59,18)) │ │ │ │ │ ├── name: :bar │ │ │ │ │ ├── name_loc: (59,12)-(59,16) = "bar:" │ │ │ │ │ └── value: @@ -1051,7 +1051,7 @@ │ │ │ │ ├── rest: ∅ │ │ │ │ ├── posts: (length: 0) │ │ │ │ ├── keywords: (length: 1) - │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (61,4)-(61,8)) + │ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (61,4)-(61,8)) │ │ │ │ │ ├── name: :foo │ │ │ │ │ └── name_loc: (61,4)-(61,8) = "foo:" │ │ │ │ ├── keyword_rest: ∅ diff --git a/test/prism/snapshots/whitequark/kwarg.txt b/test/prism/snapshots/whitequark/kwarg.txt index f0d8a921b4..7aef902fad 100644 --- a/test/prism/snapshots/whitequark/kwarg.txt +++ b/test/prism/snapshots/whitequark/kwarg.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,10)) + │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,10)) │ │ ├── name: :foo │ │ └── name_loc: (1,6)-(1,10) = "foo:" │ ├── keyword_rest: ∅ diff --git a/test/prism/snapshots/whitequark/kwoptarg.txt b/test/prism/snapshots/whitequark/kwoptarg.txt index 0b76202010..40f6d7e487 100644 --- a/test/prism/snapshots/whitequark/kwoptarg.txt +++ b/test/prism/snapshots/whitequark/kwoptarg.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,12)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,12)) │ │ ├── name: :foo │ │ ├── name_loc: (1,6)-(1,10) = "foo:" │ │ └── value: diff --git a/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt index 9b72a7f635..675c6f9300 100644 --- a/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt +++ b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt @@ -14,7 +14,7 @@ │ ├── rest: ∅ │ ├── posts: (length: 0) │ ├── keywords: (length: 1) - │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,12)) + │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,12)) │ │ ├── name: :a │ │ ├── name_loc: (1,6)-(1,8) = "a:" │ │ └── value: diff --git a/test/prism/snapshots/whitequark/ruby_bug_15789.txt b/test/prism/snapshots/whitequark/ruby_bug_15789.txt index 788462b397..657eb764d9 100644 --- a/test/prism/snapshots/whitequark/ruby_bug_15789.txt +++ b/test/prism/snapshots/whitequark/ruby_bug_15789.txt @@ -80,7 +80,7 @@ │ │ │ │ ├── rest: ∅ │ │ │ │ ├── posts: (length: 0) │ │ │ │ ├── keywords: (length: 1) - │ │ │ │ │ └── @ RequiredKeywordParameterNode (location: (3,5)-(3,14)) + │ │ │ │ │ └── @ OptionalKeywordParameterNode (location: (3,5)-(3,14)) │ │ │ │ │ ├── name: :a │ │ │ │ │ ├── name_loc: (3,5)-(3,7) = "a:" │ │ │ │ │ └── value: diff --git a/test/prism/snapshots/whitequark/ruby_bug_9669.txt b/test/prism/snapshots/whitequark/ruby_bug_9669.txt index aa9f382a85..1ba582a1d9 100644 --- a/test/prism/snapshots/whitequark/ruby_bug_9669.txt +++ b/test/prism/snapshots/whitequark/ruby_bug_9669.txt @@ -14,7 +14,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ OptionalKeywordParameterNode (location: (1,6)-(1,8)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (1,6)-(1,8)) │ │ │ ├── name: :b │ │ │ └── name_loc: (1,6)-(1,8) = "b:" │ │ ├── keyword_rest: ∅ diff --git a/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt b/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt index 47d863f157..913c9a9bb0 100644 --- a/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt +++ b/test/prism/snapshots/whitequark/send_lambda_args_noparen.txt @@ -17,7 +17,7 @@ │ │ │ ├── rest: ∅ │ │ │ ├── posts: (length: 0) │ │ │ ├── keywords: (length: 1) - │ │ │ │ └── @ RequiredKeywordParameterNode (location: (1,3)-(1,7)) + │ │ │ │ └── @ OptionalKeywordParameterNode (location: (1,3)-(1,7)) │ │ │ │ ├── name: :a │ │ │ │ ├── name_loc: (1,3)-(1,5) = "a:" │ │ │ │ └── value: @@ -43,7 +43,7 @@ │ │ ├── rest: ∅ │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 1) - │ │ │ └── @ OptionalKeywordParameterNode (location: (3,3)-(3,5)) + │ │ │ └── @ RequiredKeywordParameterNode (location: (3,3)-(3,5)) │ │ │ ├── name: :a │ │ │ └── name_loc: (3,3)-(3,5) = "a:" │ │ ├── keyword_rest: ∅ |