server
Some checks failed
Build / build (push) Failing after 6m4s
Test / build (push) Failing after 6m33s

This commit is contained in:
Chuck Smith
2024-04-02 12:21:41 -04:00
parent 862119e90e
commit 4c9ec5aaaa
77 changed files with 1181 additions and 244 deletions

View File

@@ -1,6 +1,9 @@
package object
import "fmt"
import (
"fmt"
"monkey/internal/context"
)
// Type represents the type of an object
type Type int
@@ -79,7 +82,7 @@ type Hasher interface {
}
// BuiltinFunction represents the builtin function type
type BuiltinFunction func(args ...Object) Object
type BuiltinFunction func(ctx context.Context, args ...Object) Object
func AssertTypes(obj Object, types ...Type) bool {
for _, t := range types {

View File

@@ -1,14 +0,0 @@
package object
import (
"io"
"os"
)
var (
Args []string = os.Args[1:] // Skip the monkey binary itself
Stdin io.Reader = os.Stdin
Stdout io.Writer = os.Stdout
Stderr io.Writer = os.Stderr
ExitFunction func(int) = os.Exit
)