diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-01 21:34:59 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-01 21:34:59 +0100 |
| commit | 0718f14774c152b84edb747c03ca53b9400407b9 (patch) | |
| tree | af1c16de9e6aa15bd023cb9d0ac3290c0cc229e8 /src/check_expr.cpp | |
| parent | a6fe656f21863d578c1c408f158ed5bc567a8f23 (diff) | |
Reduce number of range and slice operators #239
Replace .. and ... with : and ..
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
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) { |