@@ -1434,7 +1434,7 @@ yp_call_operator_write_node_create(yp_parser_t *parser, yp_call_node_t *target,
1434
1434
.target = target,
1435
1435
.operator_loc = YP_LOCATION_TOKEN_VALUE(operator),
1436
1436
.value = value,
1437
- .operator_id = yp_parser_constant_id_location(parser, operator->start, operator->end - 1)
1437
+ .operator = yp_parser_constant_id_location(parser, operator->start, operator->end - 1)
1438
1438
};
1439
1439
1440
1440
return node;
@@ -2959,7 +2959,7 @@ yp_lambda_node_create(
2959
2959
2960
2960
// Allocate and initialize a new LocalVariableAndWriteNode node.
2961
2961
static yp_local_variable_and_write_node_t *
2962
- yp_local_variable_and_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value, yp_constant_id_t constant_id , uint32_t depth) {
2962
+ yp_local_variable_and_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value, yp_constant_id_t name , uint32_t depth) {
2963
2963
assert(YP_NODE_TYPE_P(target, YP_NODE_LOCAL_VARIABLE_READ_NODE) || YP_NODE_TYPE_P(target, YP_NODE_CALL_NODE));
2964
2964
assert(operator->type == YP_TOKEN_AMPERSAND_AMPERSAND_EQUAL);
2965
2965
yp_local_variable_and_write_node_t *node = YP_ALLOC_NODE(parser, yp_local_variable_and_write_node_t);
@@ -2975,7 +2975,7 @@ yp_local_variable_and_write_node_create(yp_parser_t *parser, yp_node_t *target,
2975
2975
.name_loc = target->location,
2976
2976
.operator_loc = YP_LOCATION_TOKEN_VALUE(operator),
2977
2977
.value = value,
2978
- .constant_id = constant_id ,
2978
+ .name = name ,
2979
2979
.depth = depth
2980
2980
};
2981
2981
@@ -2984,7 +2984,7 @@ yp_local_variable_and_write_node_create(yp_parser_t *parser, yp_node_t *target,
2984
2984
2985
2985
// Allocate and initialize a new LocalVariableOperatorWriteNode node.
2986
2986
static yp_local_variable_operator_write_node_t *
2987
- yp_local_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value, yp_constant_id_t constant_id , uint32_t depth) {
2987
+ yp_local_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value, yp_constant_id_t name , uint32_t depth) {
2988
2988
yp_local_variable_operator_write_node_t *node = YP_ALLOC_NODE(parser, yp_local_variable_operator_write_node_t);
2989
2989
2990
2990
*node = (yp_local_variable_operator_write_node_t) {
@@ -2998,8 +2998,8 @@ yp_local_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *tar
2998
2998
.name_loc = target->location,
2999
2999
.operator_loc = YP_LOCATION_TOKEN_VALUE(operator),
3000
3000
.value = value,
3001
- .constant_id = constant_id ,
3002
- .operator_id = yp_parser_constant_id_location(parser, operator->start, operator->end - 1),
3001
+ .name = name ,
3002
+ .operator = yp_parser_constant_id_location(parser, operator->start, operator->end - 1),
3003
3003
.depth = depth
3004
3004
};
3005
3005
@@ -3008,7 +3008,7 @@ yp_local_variable_operator_write_node_create(yp_parser_t *parser, yp_node_t *tar
3008
3008
3009
3009
// Allocate and initialize a new LocalVariableOrWriteNode node.
3010
3010
static yp_local_variable_or_write_node_t *
3011
- yp_local_variable_or_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value, yp_constant_id_t constant_id , uint32_t depth) {
3011
+ yp_local_variable_or_write_node_create(yp_parser_t *parser, yp_node_t *target, const yp_token_t *operator, yp_node_t *value, yp_constant_id_t name , uint32_t depth) {
3012
3012
assert(YP_NODE_TYPE_P(target, YP_NODE_LOCAL_VARIABLE_READ_NODE) || YP_NODE_TYPE_P(target, YP_NODE_CALL_NODE));
3013
3013
assert(operator->type == YP_TOKEN_PIPE_PIPE_EQUAL);
3014
3014
yp_local_variable_or_write_node_t *node = YP_ALLOC_NODE(parser, yp_local_variable_or_write_node_t);
@@ -3024,7 +3024,7 @@ yp_local_variable_or_write_node_create(yp_parser_t *parser, yp_node_t *target, c
3024
3024
.name_loc = target->location,
3025
3025
.operator_loc = YP_LOCATION_TOKEN_VALUE(operator),
3026
3026
.value = value,
3027
- .constant_id = constant_id ,
3027
+ .name = name ,
3028
3028
.depth = depth
3029
3029
};
3030
3030
@@ -3041,7 +3041,7 @@ yp_local_variable_read_node_create(yp_parser_t *parser, const yp_token_t *name,
3041
3041
.type = YP_NODE_LOCAL_VARIABLE_READ_NODE,
3042
3042
.location = YP_LOCATION_TOKEN_VALUE(name)
3043
3043
},
3044
- .constant_id = yp_parser_constant_id_token(parser, name),
3044
+ .name = yp_parser_constant_id_token(parser, name),
3045
3045
.depth = depth
3046
3046
};
3047
3047
@@ -3050,7 +3050,7 @@ yp_local_variable_read_node_create(yp_parser_t *parser, const yp_token_t *name,
3050
3050
3051
3051
// Allocate and initialize a new LocalVariableWriteNode node.
3052
3052
static yp_local_variable_write_node_t *
3053
- yp_local_variable_write_node_create(yp_parser_t *parser, yp_constant_id_t constant_id , uint32_t depth, yp_node_t *value, const yp_location_t *name_loc, const yp_token_t *operator) {
3053
+ yp_local_variable_write_node_create(yp_parser_t *parser, yp_constant_id_t name , uint32_t depth, yp_node_t *value, const yp_location_t *name_loc, const yp_token_t *operator) {
3054
3054
yp_local_variable_write_node_t *node = YP_ALLOC_NODE(parser, yp_local_variable_write_node_t);
3055
3055
3056
3056
*node = (yp_local_variable_write_node_t) {
@@ -3061,7 +3061,7 @@ yp_local_variable_write_node_create(yp_parser_t *parser, yp_constant_id_t consta
3061
3061
.end = value->location.end
3062
3062
}
3063
3063
},
3064
- .constant_id = constant_id ,
3064
+ .name = name ,
3065
3065
.depth = depth,
3066
3066
.value = value,
3067
3067
.name_loc = *name_loc,
@@ -3081,7 +3081,7 @@ yp_local_variable_target_node_create(yp_parser_t *parser, const yp_token_t *name
3081
3081
.type = YP_NODE_LOCAL_VARIABLE_TARGET_NODE,
3082
3082
.location = YP_LOCATION_TOKEN_VALUE(name)
3083
3083
},
3084
- .constant_id = yp_parser_constant_id_token(parser, name),
3084
+ .name = yp_parser_constant_id_token(parser, name),
3085
3085
.depth = 0
3086
3086
};
3087
3087
@@ -3279,7 +3279,7 @@ yp_optional_parameter_node_create(yp_parser_t *parser, const yp_token_t *name, c
3279
3279
.end = value->location.end
3280
3280
}
3281
3281
},
3282
- .constant_id = yp_parser_constant_id_token(parser, name),
3282
+ .name = yp_parser_constant_id_token(parser, name),
3283
3283
.name_loc = YP_LOCATION_TOKEN_VALUE(name),
3284
3284
.operator_loc = YP_LOCATION_TOKEN_VALUE(operator),
3285
3285
.value = value
@@ -3630,7 +3630,7 @@ yp_required_parameter_node_create(yp_parser_t *parser, const yp_token_t *token)
3630
3630
.type = YP_NODE_REQUIRED_PARAMETER_NODE,
3631
3631
.location = YP_LOCATION_TOKEN_VALUE(token)
3632
3632
},
3633
- .constant_id = yp_parser_constant_id_token(parser, token)
3633
+ .name = yp_parser_constant_id_token(parser, token)
3634
3634
};
3635
3635
3636
3636
return node;
@@ -7987,7 +7987,7 @@ parse_write(yp_parser_t *parser, yp_node_t *target, yp_token_t *operator, yp_nod
7987
7987
case YP_NODE_LOCAL_VARIABLE_READ_NODE: {
7988
7988
yp_local_variable_read_node_t *local_read = (yp_local_variable_read_node_t *) target;
7989
7989
7990
- yp_constant_id_t constant_id = local_read->constant_id ;
7990
+ yp_constant_id_t constant_id = local_read->name ;
7991
7991
uint32_t depth = local_read->depth;
7992
7992
7993
7993
yp_location_t name_loc = target->location;
@@ -12793,7 +12793,7 @@ parse_expression_infix(yp_parser_t *parser, yp_node_t *node, yp_binding_power_t
12793
12793
parser_lex(parser);
12794
12794
12795
12795
yp_node_t *value = parse_expression(parser, binding_power, "Expected a value after &&=");
12796
- yp_node_t *result = (yp_node_t *) yp_local_variable_and_write_node_create(parser, node, &token, value, cast->constant_id , cast->depth);
12796
+ yp_node_t *result = (yp_node_t *) yp_local_variable_and_write_node_create(parser, node, &token, value, cast->name , cast->depth);
12797
12797
12798
12798
yp_node_destroy(parser, node);
12799
12799
return result;
@@ -12894,7 +12894,7 @@ parse_expression_infix(yp_parser_t *parser, yp_node_t *node, yp_binding_power_t
12894
12894
parser_lex(parser);
12895
12895
12896
12896
yp_node_t *value = parse_expression(parser, binding_power, "Expected a value after ||=");
12897
- yp_node_t *result = (yp_node_t *) yp_local_variable_or_write_node_create(parser, node, &token, value, cast->constant_id , cast->depth);
12897
+ yp_node_t *result = (yp_node_t *) yp_local_variable_or_write_node_create(parser, node, &token, value, cast->name , cast->depth);
12898
12898
12899
12899
yp_node_destroy(parser, node);
12900
12900
return result;
@@ -13005,7 +13005,7 @@ parse_expression_infix(yp_parser_t *parser, yp_node_t *node, yp_binding_power_t
13005
13005
parser_lex(parser);
13006
13006
13007
13007
yp_node_t *value = parse_expression(parser, binding_power, "Expected a value after the operator.");
13008
- yp_node_t *result = (yp_node_t *) yp_local_variable_operator_write_node_create(parser, node, &token, value, cast->constant_id , cast->depth);
13008
+ yp_node_t *result = (yp_node_t *) yp_local_variable_operator_write_node_create(parser, node, &token, value, cast->name , cast->depth);
13009
13009
13010
13010
yp_node_destroy(parser, node);
13011
13011
return result;
0 commit comments