diff options
| author | gingerBill <bill@gingerbill.org> | 2020-01-16 10:00:14 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-01-16 10:00:14 +0000 |
| commit | 159150c6d9a7d421c0d58bd582847104799606d4 (patch) | |
| tree | f3e3b9b6763feba9ea24b2b5cfe2016927c8f53f /src/check_expr.cpp | |
| parent | 527b39ce2b6cd9ef20af7a04c81017af809c2cdb (diff) | |
Allow not_in as keyword over notin, but still allow notin to work
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index c29325ea0..4f1aed898 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2397,7 +2397,7 @@ void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, Type *type_hint } case Token_in: - case Token_notin: + case Token_not_in: // IMPORTANT NOTE(bill): This uses right-left evaluation in type checking only no in check_expr(c, y, be->right); @@ -2426,7 +2426,7 @@ void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, Type *type_hint if (op.kind == Token_in) { check_assignment(c, x, yt->Map.key, str_lit("map 'in'")); } else { - check_assignment(c, x, yt->Map.key, str_lit("map 'notin'")); + check_assignment(c, x, yt->Map.key, str_lit("map 'not_in'")); } add_package_dependency(c, "runtime", "__dynamic_map_get"); @@ -2436,7 +2436,7 @@ void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, Type *type_hint if (op.kind == Token_in) { check_assignment(c, x, yt->BitSet.elem, str_lit("bit_set 'in'")); } else { - check_assignment(c, x, yt->BitSet.elem, str_lit("bit_set 'notin'")); + check_assignment(c, x, yt->BitSet.elem, str_lit("bit_set 'not_in'")); } if (x->mode == Addressing_Constant && y->mode == Addressing_Constant) { ExactValue k = exact_value_to_integer(x->value); |