diff options
| author | Ginger Bill <github@gingerbill.org> | 2016-08-18 15:58:36 +0100 |
|---|---|---|
| committer | Ginger Bill <github@gingerbill.org> | 2016-08-18 15:58:36 +0100 |
| commit | f931b089d5ce0374e36c3241176e4ef24953522e (patch) | |
| tree | 034bcf331e049919b6ecd42ab48e19fc77993a16 /src/checker/stmt.cpp | |
| parent | 6b2cd1b33fafb18e052ebc5df19481232202607b (diff) | |
print_(f32|f64)
Diffstat (limited to 'src/checker/stmt.cpp')
| -rw-r--r-- | src/checker/stmt.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/checker/stmt.cpp b/src/checker/stmt.cpp index 3a059b2ab..54ef410c4 100644 --- a/src/checker/stmt.cpp +++ b/src/checker/stmt.cpp @@ -190,14 +190,14 @@ Type *check_assignment_variable(Checker *c, Operand *op_a, AstNode *lhs) { ast_node(i, Ident, node); e = scope_lookup_entity(c->context.scope, i->token.string); if (e != NULL && e->kind == Entity_Variable) { - used = e->variable.used; // TODO(bill): Make backup just in case + used = e->Variable.used; // TODO(bill): Make backup just in case } } Operand op_b = {Addressing_Invalid}; check_expr(c, &op_b, lhs); - if (e) e->variable.used = used; + if (e) e->Variable.used = used; if (op_b.mode == Addressing_Invalid || op_b.type == t_invalid) { @@ -325,18 +325,18 @@ void check_init_constant(Checker *c, Entity *e, Operand *operand) { if (operand->mode == Addressing_Invalid) return; - e->constant.value = operand->value; + e->Constant.value = operand->value; } void check_const_decl(Checker *c, Entity *e, AstNode *type_expr, AstNode *init_expr) { GB_ASSERT(e->type == NULL); - if (e->variable.visited) { + if (e->Variable.visited) { e->type = t_invalid; return; } - e->variable.visited = true; + e->Variable.visited = true; if (type_expr) { Type *t = check_type(c, type_expr); @@ -437,11 +437,11 @@ void check_var_decl(Checker *c, Entity *e, Entity **entities, isize entity_count GB_ASSERT(e->type == NULL); GB_ASSERT(e->kind == Entity_Variable); - if (e->variable.visited) { + if (e->Variable.visited) { e->type = t_invalid; return; } - e->variable.visited = true; + e->Variable.visited = true; if (type_expr != NULL) e->type = check_type(c, type_expr, NULL); @@ -791,11 +791,11 @@ void check_stmt(Checker *c, AstNode *node, u32 flags) { for (isize i = 0; i < entity_count; i++) { Entity *e = entities[i]; GB_ASSERT(e != NULL); - if (e->variable.visited) { + if (e->Variable.visited) { e->type = t_invalid; continue; } - e->variable.visited = true; + e->Variable.visited = true; if (e->type == NULL) e->type = init_type; |