Implemented struct pointer types
This commit is contained in:
@ -14,7 +14,18 @@ func Compile(files <-chan *fs.File, functions <-chan *core.Function, structs <-c
|
||||
result := Result{}
|
||||
allFiles := make([]*fs.File, 0, 8)
|
||||
allFunctions := map[string]*core.Function{}
|
||||
allTypes := map[string]types.Type{}
|
||||
|
||||
allTypes := map[string]types.Type{
|
||||
"Int": types.Int,
|
||||
"Int64": types.Int64,
|
||||
"Int32": types.Int32,
|
||||
"Int16": types.Int16,
|
||||
"Int8": types.Int8,
|
||||
"Float": types.Float,
|
||||
"Float64": types.Float64,
|
||||
"Float32": types.Float32,
|
||||
"Pointer": types.PointerAny,
|
||||
}
|
||||
|
||||
for functions != nil || files != nil || errs != nil {
|
||||
select {
|
||||
@ -54,6 +65,15 @@ func Compile(files <-chan *fs.File, functions <-chan *core.Function, structs <-c
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve the types
|
||||
for _, function := range allFunctions {
|
||||
err := function.ResolveTypes()
|
||||
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
// Start parallel compilation
|
||||
CompileFunctions(allFunctions)
|
||||
|
||||
|
Reference in New Issue
Block a user