clean up build errors

This commit is contained in:
Aidan 2020-06-20 22:56:22 -07:00
parent 72e1275e48
commit 30481d4f78
No known key found for this signature in database
GPG key ID: 327711E983899316
3 changed files with 13 additions and 14 deletions

View file

@ -28,14 +28,14 @@ type Function struct {
type FuncTable map[string]*Function
// TODO: Currently only checks arg list length
func (Function f) ParseFunction(args *ast.Token) bool {
func (f Function) ParseFunction(args *Token) bool {
// HANDLE EXEC
if target.args < 0 {
if f.args < 0 {
return true
}
i := target.args
for iter := &args; *iter != nil; iter = &((*iter).next) {
i := f.args
for iter := args; iter != nil; iter = iter.Next {
i -= 1
}
@ -47,8 +47,8 @@ func (Function f) ParseFunction(args *ast.Token) bool {
return true
}
func (Function f) CallFunction(args *Token) *Token {
if !ParseFunction(f, args) {
func (f Function) CallFunction(args *Token) *Token {
if !f.ParseFunction(args) {
return nil
}
@ -56,7 +56,7 @@ func (Function f) CallFunction(args *Token) *Token {
return f.function(args)
}
func (FuncTable table) GetFunction(arg string) *Function {
func (table FuncTable) GetFunction(arg string) *Function {
target, ok := table[arg]
if !ok {
return nil