Implemented struct size calculation after a scan
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user