diff options
| author | gingerBill <bill@gingerbill.org> | 2019-05-28 12:45:20 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-05-28 12:45:20 +0100 |
| commit | 222941727f2b094449838135c3157120e0176e58 (patch) | |
| tree | 6e3051341f1873873596594abfe02693aad4e6fc /src/ir.cpp | |
| parent | 5697d6df7466ef5f4e676f391c104ef165cadb6b (diff) | |
Add `..<` operator for ranges; Add extra checking for bit set assignments
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 533414e50..2f2da1826 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -8156,7 +8156,8 @@ void ir_build_range_interval(irProcedure *proc, AstBinaryExpr *node, Type *val_t TokenKind op = Token_Lt; switch (node->op.kind) { - case Token_Ellipsis: op = Token_LtEq; break; + case Token_Ellipsis: op = Token_LtEq; break; + case Token_RangeHalf: op = Token_Lt; break; default: GB_PANIC("Invalid interval operator"); break; } @@ -8832,7 +8833,8 @@ void ir_build_stmt_internal(irProcedure *proc, Ast *node) { ast_node(ie, BinaryExpr, expr); TokenKind op = Token_Invalid; switch (ie->op.kind) { - case Token_Ellipsis: op = Token_LtEq; break; + case Token_Ellipsis: op = Token_LtEq; break; + case Token_RangeHalf: op = Token_Lt; break; default: GB_PANIC("Invalid interval operator"); break; } irValue *lhs = ir_build_expr(proc, ie->left); |