Implemented struct size calculation after a scan

This commit is contained in:
Eduard Urbach 2025-02-07 16:26:24 +01:00
parent 8fe663ece1
commit 162ddbefef
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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()