[ruby/prism] Remove flag gating for 3.3.0 bug fixes

https://github.com/ruby/prism/commit/64baf94271
This commit is contained in:
Kevin Newton 2024-01-17 10:44:37 -05:00 коммит произвёл git
Родитель afba09d30f
Коммит 3f23cb1a43
2 изменённых файлов: 5 добавлений и 11 удалений

Просмотреть файл

@ -25,9 +25,9 @@ typedef struct pm_options_scope {
} pm_options_scope_t;
/**
* The version of prism that we should be parsing with. This is used to allow
* consumers to specify which behavior they want in case they need to parse
* exactly as a specific version of CRuby.
* The version of Ruby syntax that we should be parsing with. This is used to
* allow consumers to specify which behavior they want in case they need to
* parse in the same way as a specific version of CRuby would have.
*/
typedef enum {
/** The current version of prism. */

Просмотреть файл

@ -2203,14 +2203,10 @@ pm_index_target_node_create(pm_parser_t *parser, pm_call_node_t *target) {
pm_index_target_node_t *node = PM_ALLOC_NODE(parser, pm_index_target_node_t);
pm_node_flags_t flags = target->base.flags;
if (parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0) {
flags |= PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE;
}
*node = (pm_index_target_node_t) {
{
.type = PM_INDEX_TARGET_NODE,
.flags = flags,
.flags = flags | PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE,
.location = target->base.location
},
.receiver = target->receiver,
@ -12306,9 +12302,7 @@ parse_arguments_list(pm_parser_t *parser, pm_arguments_t *arguments, bool accept
arguments->block = (pm_node_t *) block;
} else {
if (arguments->has_forwarding) {
if (parser->version != PM_OPTIONS_VERSION_CRUBY_3_3_0) {
pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_FORWARDING);
}
pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_FORWARDING);
} else {
pm_parser_err_node(parser, (pm_node_t *) block, PM_ERR_ARGUMENT_BLOCK_MULTI);
}