From 476bacc27671de92e8fdbc5b2a904bbf8bc80377 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 24 Aug 2025 17:07:41 -0400 Subject: More splitting out into separate files. --- src/compile/structs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/compile/structs.c') diff --git a/src/compile/structs.c b/src/compile/structs.c index a5889ff8..3244f6f3 100644 --- a/src/compile/structs.c +++ b/src/compile/structs.c @@ -8,7 +8,10 @@ #include "../stdlib/tables.h" #include "../stdlib/text.h" #include "../typecheck.h" +#include "assignments.h" +#include "functions.h" #include "pointers.h" +#include "types.h" public Text_t compile_struct_typeinfo(env_t *env, type_t *t, const char *name, arg_ast_t *fields, bool is_secret, @@ -99,7 +102,7 @@ Text_t compile_empty_struct(type_t *t) { public Text_t compile_struct_field_access(env_t *env, ast_t *ast) { DeclareMatch(f, ast, FieldAccess); - type_t *fielded_t = get_type(env, ast); + type_t *fielded_t = get_type(env, f->fielded); type_t *value_t = value_type(fielded_t); for (arg_t *field = Match(value_t, StructType)->fields; field; field = field->next) { if (streq(field->name, f->field)) { -- cgit v1.2.3