Implemented struct pointer types

This commit is contained in:
Eduard Urbach 2025-02-05 15:16:00 +01:00
parent f7bc903aa4
commit f76f0a1e4b
Signed by: eduard
GPG key ID: 49226B848C78F6C8
17 changed files with 190 additions and 102 deletions

View file

@ -4,7 +4,6 @@ import (
"git.akyoto.dev/cli/q/src/dll"
"git.akyoto.dev/cli/q/src/fs"
"git.akyoto.dev/cli/q/src/register"
"git.akyoto.dev/cli/q/src/scope"
"git.akyoto.dev/cli/q/src/token"
"git.akyoto.dev/cli/q/src/types"
)
@ -12,19 +11,19 @@ import (
// Function represents the smallest unit of code.
type Function struct {
register.Machine
Package string
Name string
UniqueName string
File *fs.File
Body token.List
Parameters []*scope.Variable
ReturnTypes []types.Type
Functions map[string]*Function
Types map[string]types.Type
DLLs dll.List
Err error
deferred []func()
count counter
Package string
Name string
UniqueName string
File *fs.File
Body token.List
Input []*Input
Output []*Output
Functions map[string]*Function
Types map[string]types.Type
DLLs dll.List
Err error
deferred []func()
count counter
}
// counter stores how often a certain statement appeared so we can generate a unique label from it.