server
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user