Minor code cleanup for backend; add struct_fields_index_by_increasing_offset for future use

This commit is contained in:
gingerBill
2021-10-02 17:22:56 +01:00
parent ebca0398a7
commit 00671a59a0
9 changed files with 99 additions and 113 deletions
+1 -2
View File
@@ -39,8 +39,7 @@ void populate_using_entity_scope(CheckerContext *ctx, Ast *node, AstField *field
}
if (t->kind == Type_Struct) {
for_array(i, t->Struct.fields) {
Entity *f = t->Struct.fields[i];
for (Entity *f : t->Struct.fields) {
GB_ASSERT(f->kind == Entity_Variable);
String name = f->token.string;
Entity *e = scope_lookup_current(ctx->scope, name);