Allow not_in as keyword over notin, but still allow notin to work

This commit is contained in:
gingerBill
2020-01-16 10:00:14 +00:00
parent 527b39ce2b
commit 159150c6d9
9 changed files with 31 additions and 30 deletions
+3 -3
View File
@@ -7302,7 +7302,7 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) {
case Token_in:
case Token_notin: {
case Token_not_in: {
irValue *left = ir_build_expr(proc, be->left);
Type *type = default_type(tv.type);
irValue *right = ir_build_expr(proc, be->right);
@@ -7313,7 +7313,7 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) {
if (be->op.kind == Token_in) {
ir_emit_comment(proc, str_lit("map in"));
} else {
ir_emit_comment(proc, str_lit("map notin"));
ir_emit_comment(proc, str_lit("map not_in"));
}
irValue *addr = ir_address_from_load_or_generate_local(proc, right);
@@ -7337,7 +7337,7 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) {
if (be->op.kind == Token_in) {
ir_emit_comment(proc, str_lit("bit_set in"));
} else {
ir_emit_comment(proc, str_lit("bit_set notin"));
ir_emit_comment(proc, str_lit("bit_set not_in"));
}
Type *key_type = rt->BitSet.elem;