diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-09-06 11:06:26 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-07 12:42:00 +0000 |
commit | 9e21b33ece212b67d62cf47527a1d9e0251c9fdd (patch) | |
tree | d5377eea0e5c1edd42a5d932d07ac1d10665c47f /yarp | |
parent | e2a0f25888d089f6f858e584c3210c2d00ad3f12 (diff) |
[ruby/yarp] Constants on keyword parameters
https://github.com/ruby/yarp/commit/d2d4f25a23
Diffstat (limited to 'yarp')
-rw-r--r-- | yarp/config.yml | 2 | ||||
-rw-r--r-- | yarp/yarp.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/yarp/config.yml b/yarp/config.yml index 4207e09a0c..91d6d81cb5 100644 --- a/yarp/config.yml +++ b/yarp/config.yml @@ -1556,6 +1556,8 @@ nodes: ^^^^ - name: KeywordParameterNode fields: + - name: name + type: constant - name: name_loc type: location - name: value diff --git a/yarp/yarp.c b/yarp/yarp.c index 17ef80c472..6596b87620 100644 --- a/yarp/yarp.c +++ b/yarp/yarp.c @@ -3067,6 +3067,7 @@ yp_keyword_parameter_node_create(yp_parser_t *parser, const yp_token_t *name, yp .end = value == NULL ? name->end : value->location.end }, }, + .name = yp_parser_constant_id_location(parser, name->start, name->end - 1), .name_loc = YP_LOCATION_TOKEN_VALUE(name), .value = value }; |