Implemented struct size calculation after a scan
This commit is contained in:
parent
8fe663ece1
commit
162ddbefef
7 changed files with 48 additions and 24 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue