Skip to content

Commit

Permalink
[PRISM] using []= to set kwargs is a syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
eightbitraptor committed Dec 13, 2024
1 parent 3cb79d4 commit 35c45f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prism/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -13767,6 +13767,9 @@ parse_write(pm_parser_t *parser, pm_node_t *target, pm_token_t *operator, pm_nod

// Replace the name with "[]=".
call->name = pm_parser_constant_id_constant(parser, "[]=", 3);

// Ensure that the arguments for []= don't contain keywords
pm_index_arguments_check(parser, call->arguments, NULL);
pm_node_flag_set((pm_node_t *) call, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE | pm_implicit_array_write_flags(value, PM_CALL_NODE_FLAGS_IMPLICIT_ARRAY));

return target;
Expand Down

0 comments on commit 35c45f6

Please sign in to comment.