aboutsummaryrefslogtreecommitdiff
path: root/src/checker/stmt.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-10-12 17:51:36 +0100
committerGinger Bill <bill@gingerbill.org>2016-10-12 17:51:36 +0100
commitf3209584a3ae22afc84f2bde6899e248bc86a154 (patch)
tree603caa5452dbd3b03ea0b7f6b3cf352f9ad640f4 /src/checker/stmt.cpp
parentf5318c46d13ed3f3de20e0f61c4193e6ad46a42b (diff)
Add Pointer Arithmetic
Diffstat (limited to 'src/checker/stmt.cpp')
-rw-r--r--src/checker/stmt.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/checker/stmt.cpp b/src/checker/stmt.cpp
index e4927345e..0b703edac 100644
--- a/src/checker/stmt.cpp
+++ b/src/checker/stmt.cpp
@@ -1007,14 +1007,16 @@ void check_stmt(Checker *c, AstNode *node, u32 flags) {
Operand operand = {Addressing_Invalid};
AstNode binary_expr = {AstNode_BinaryExpr};
ast_node(be, BinaryExpr, &binary_expr);
- be->op = op;
+ be->op = op;
+ be->op.kind = cast(TokenKind)(cast(i32)be->op.kind - (Token_AddEq - Token_Add));
// NOTE(bill): Only use the first one will be used
be->left = as->lhs[0];
be->right = as->rhs[0];
check_binary_expr(c, &operand, &binary_expr);
- if (operand.mode == Addressing_Invalid)
+ if (operand.mode == Addressing_Invalid) {
return;
+ }
// NOTE(bill): Only use the first one will be used
check_assignment_variable(c, &operand, as->lhs[0]);
} break;