Implemented struct size calculation after a scan

This commit is contained in:
2025-02-07 16:26:24 +01:00
parent c28eace966
commit 63a2752c56
7 changed files with 48 additions and 24 deletions

View File

@ -65,6 +65,17 @@ func Compile(files <-chan *fs.File, functions <-chan *core.Function, structs <-c
}
}
// Calculate size of structs
for _, typ := range allTypes {
structure, isStruct := typ.(*types.Struct)
if !isStruct {
continue
}
structure.Update(allTypes)
}
// Resolve the types
for _, function := range allFunctions {
err := function.ResolveTypes()