Removed unnecessary parameter
This commit is contained in:
parent
0dffb79364
commit
aec22b0a7e
@ -6,18 +6,16 @@ import (
|
||||
"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/x86"
|
||||
)
|
||||
|
||||
// NewFunction creates a new function.
|
||||
func NewFunction(pkg string, name string, file *fs.File, body []token.Token) *Function {
|
||||
func NewFunction(pkg string, name string, file *fs.File) *Function {
|
||||
return &Function{
|
||||
Package: pkg,
|
||||
Name: name,
|
||||
UniqueName: pkg + "." + name,
|
||||
File: file,
|
||||
Body: body,
|
||||
Machine: register.Machine{
|
||||
Assembler: asm.Assembler{
|
||||
Instructions: make([]asm.Instruction, 0, 8),
|
||||
|
@ -86,7 +86,7 @@ func scanFunctionSignature(file *fs.File, tokens token.List, i int, delimiter to
|
||||
}
|
||||
|
||||
name := tokens[nameStart].Text(file.Bytes)
|
||||
function := core.NewFunction(file.Package, name, file, nil)
|
||||
function := core.NewFunction(file.Package, name, file)
|
||||
|
||||
if typeStart != -1 {
|
||||
if tokens[typeStart].Kind == token.GroupStart && tokens[typeEnd-1].Kind == token.GroupEnd {
|
||||
|
Loading…
x
Reference in New Issue
Block a user