diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-09-06 15:30:38 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-07 12:41:45 +0000 |
commit | e2a0f25888d089f6f858e584c3210c2d00ad3f12 (patch) | |
tree | 1918ea9f68b84395b1c6152f2df4e927d82f9653 /yarp | |
parent | 5184b40dd4dc446660cd35c3e53896324e95b317 (diff) |
[ruby/yarp] Remove name constant from classes/modules
https://github.com/ruby/yarp/commit/26105f0b58
Diffstat (limited to 'yarp')
-rw-r--r-- | yarp/config.yml | 4 | ||||
-rw-r--r-- | yarp/yarp.c | 8 |
2 files changed, 2 insertions, 10 deletions
diff --git a/yarp/config.yml b/yarp/config.yml index 5ccdabab16..4207e09a0c 100644 --- a/yarp/config.yml +++ b/yarp/config.yml @@ -782,8 +782,6 @@ nodes: type: location - name: name type: constant - - name: name_constant - type: constant comment: | Represents a class declaration involving the `class` keyword. @@ -1742,8 +1740,6 @@ nodes: type: location - name: name type: constant - - name: name_constant - type: constant comment: | Represents a module declaration involving the `module` keyword. diff --git a/yarp/yarp.c b/yarp/yarp.c index 2bce80abad..17ef80c472 100644 --- a/yarp/yarp.c +++ b/yarp/yarp.c @@ -1655,7 +1655,6 @@ yp_case_node_end_keyword_loc_set(yp_case_node_t *node, const yp_token_t *end_key static yp_class_node_t * yp_class_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const yp_token_t *class_keyword, yp_node_t *constant_path, const yp_token_t *name, const yp_token_t *inheritance_operator, yp_node_t *superclass, yp_node_t *body, const yp_token_t *end_keyword) { yp_class_node_t *node = YP_ALLOC_NODE(parser, yp_class_node_t); - yp_constant_id_t name_constant = yp_parser_constant_id_token(parser, name); *node = (yp_class_node_t) { { @@ -1669,8 +1668,7 @@ yp_class_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const y .superclass = superclass, .body = body, .end_keyword_loc = YP_LOCATION_TOKEN_VALUE(end_keyword), - .name = name_constant, - .name_constant = name_constant + .name = yp_parser_constant_id_token(parser, name) }; return node; @@ -3305,7 +3303,6 @@ yp_match_required_node_create(yp_parser_t *parser, yp_node_t *value, yp_node_t * static yp_module_node_t * yp_module_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const yp_token_t *module_keyword, yp_node_t *constant_path, const yp_token_t *name, yp_node_t *body, const yp_token_t *end_keyword) { yp_module_node_t *node = YP_ALLOC_NODE(parser, yp_module_node_t); - yp_constant_id_t name_constant = yp_parser_constant_id_token(parser, name); *node = (yp_module_node_t) { { @@ -3320,8 +3317,7 @@ yp_module_node_create(yp_parser_t *parser, yp_constant_id_list_t *locals, const .constant_path = constant_path, .body = body, .end_keyword_loc = YP_LOCATION_TOKEN_VALUE(end_keyword), - .name = name_constant, - .name_constant = name_constant + .name = yp_parser_constant_id_token(parser, name) }; return node; |