Added types
This commit is contained in:
parent
7c5e0ae3a1
commit
baa2463b4b
19 changed files with 122 additions and 60 deletions
|
@ -3,21 +3,25 @@ package core
|
|||
import (
|
||||
"git.akyoto.dev/cli/q/src/build/fs"
|
||||
"git.akyoto.dev/cli/q/src/build/register"
|
||||
"git.akyoto.dev/cli/q/src/build/scope"
|
||||
"git.akyoto.dev/cli/q/src/build/token"
|
||||
"git.akyoto.dev/cli/q/src/build/types"
|
||||
)
|
||||
|
||||
// Function represents the smallest unit of code.
|
||||
type Function struct {
|
||||
register.Machine
|
||||
Package string
|
||||
Name string
|
||||
UniqueName string
|
||||
File *fs.File
|
||||
Body []token.Token
|
||||
Functions map[string]*Function
|
||||
Err error
|
||||
deferred []func()
|
||||
count counter
|
||||
Package string
|
||||
Name string
|
||||
UniqueName string
|
||||
File *fs.File
|
||||
Body token.List
|
||||
Parameters []*scope.Variable
|
||||
ReturnTypes []types.Type
|
||||
Functions map[string]*Function
|
||||
Err error
|
||||
deferred []func()
|
||||
count counter
|
||||
}
|
||||
|
||||
// counter stores how often a certain statement appeared so we can generate a unique label from it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue