[ruby/yarp] Create arguments when necessary
https://github.com/ruby/yarp/commit/123332f255
This commit is contained in:
parent
c8c35ded74
commit
c0d27af114
@ -14141,6 +14141,9 @@ parse_expression_infix(yp_parser_t *parser, yp_node_t *node, yp_binding_power_t
|
|||||||
if (block != NULL) {
|
if (block != NULL) {
|
||||||
if (arguments.block != NULL) {
|
if (arguments.block != NULL) {
|
||||||
yp_diagnostic_list_append(&parser->error_list, block->base.location.start, block->base.location.end, YP_ERR_ARGUMENT_AFTER_BLOCK);
|
yp_diagnostic_list_append(&parser->error_list, block->base.location.start, block->base.location.end, YP_ERR_ARGUMENT_AFTER_BLOCK);
|
||||||
|
if (arguments.arguments == NULL) {
|
||||||
|
arguments.arguments = yp_arguments_node_create(parser);
|
||||||
|
}
|
||||||
yp_arguments_node_arguments_append(arguments.arguments, arguments.block);
|
yp_arguments_node_arguments_append(arguments.arguments, arguments.block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user