From 0718f14774c152b84edb747c03ca53b9400407b9 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 1 Aug 2018 21:34:59 +0100 Subject: Reduce number of range and slice operators #239 Replace .. and ... with : and .. --- src/check_expr.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/check_expr.cpp') diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 5596eb106..479103241 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -6110,8 +6110,6 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type // It is okay to continue as it will assume the 1st index is zero } - TokenKind interval_kind = se->interval.kind; - i64 indices[2] = {}; Ast *nodes[2] = {se->low, se->high}; for (isize i = 0; i < gb_count_of(nodes); i++) { @@ -6122,7 +6120,7 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type capacity = max_count; } i64 j = 0; - if (check_index_value(c, interval_kind == Token_Ellipsis, nodes[i], capacity, &j)) { + if (check_index_value(c, false, nodes[i], capacity, &j)) { index = j; } } else if (i == 0) { -- cgit v1.2.3