Skip to content

Commit

Permalink
map: Comment on issue of concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Oct 2, 2024
1 parent 8aad00c commit 8ae9997
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flamingo/grammar/binary_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ static int parse_binary_expr(flamingo_t* flamingo, TSNode node, flamingo_val_t**

if (kind == FLAMINGO_VAL_KIND_MAP) {
// Map concatenation.
// TODO There's a small issue here: how to handle different values for the same key when adding? Should there be a preference to keep either the left or the right side? Is that too much of a "quirk" to be something I wanna do? Should this ability just be removed entirely?

if (strncmp(op, "+", op_size) == 0) {
(*val)->kind = FLAMINGO_VAL_KIND_MAP;
Expand Down

0 comments on commit 8ae9997

Please sign in to comment.