Documentation
¶
Overview ¶
Package evaluator contains the core of our interpreter, which walks the AST produced by the parser and evaluates user code.
Index ¶
- func All(ctx context.Context, args ...object.Object) object.Object
- func Any(ctx context.Context, args ...object.Object) object.Object
- func Assert(ctx context.Context, args ...object.Object) object.Object
- func Bool(ctx context.Context, args ...object.Object) object.Object
- func Call(ctx context.Context, args ...object.Object) object.Object
- func Chr(ctx context.Context, args ...object.Object) object.Object
- func Delete(ctx context.Context, args ...object.Object) object.Object
- func Err(ctx context.Context, args ...object.Object) object.Object
- func Fetch(ctx context.Context, args ...object.Object) object.Object
- func Float(ctx context.Context, args ...object.Object) object.Object
- func GetAttr(ctx context.Context, args ...object.Object) object.Object
- func GlobalBuiltins() []*object.Builtin
- func Int(ctx context.Context, args ...object.Object) object.Object
- func Keys(ctx context.Context, args ...object.Object) object.Object
- func Len(ctx context.Context, args ...object.Object) object.Object
- func List(ctx context.Context, args ...object.Object) object.Object
- func Match(ctx context.Context, args ...object.Object) object.Object
- func Ok(ctx context.Context, args ...object.Object) object.Object
- func Ord(ctx context.Context, args ...object.Object) object.Object
- func Print(ctx context.Context, args ...object.Object) object.Object
- func Printf(ctx context.Context, args ...object.Object) object.Object
- func Reversed(ctx context.Context, args ...object.Object) object.Object
- func Set(ctx context.Context, args ...object.Object) object.Object
- func Sorted(ctx context.Context, args ...object.Object) object.Object
- func Sprintf(ctx context.Context, args ...object.Object) object.Object
- func String(ctx context.Context, args ...object.Object) object.Object
- func Type(ctx context.Context, args ...object.Object) object.Object
- func Unwrap(ctx context.Context, args ...object.Object) object.Object
- func UnwrapOr(ctx context.Context, args ...object.Object) object.Object
- type Evaluator
- type Importer
- type Opts
- type SimpleImporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GlobalBuiltins ¶ added in v0.0.6
Types ¶
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator is used to execute Tamarin AST nodes.
type Opts ¶
type Opts struct {
// Importer is used to import Tamarin code modules. If nil, module imports
// are not supported and an import will result in an error that stops code
// execution.
Importer Importer
// If set to true, the default builtins will not be registered.
DisableDefaultBuiltins bool
// Supplies extra and/or override builtins for evaluation.
Builtins []*object.Builtin
}
Opts configures Tamarin code evaluation.
Click to show internal directories.
Click to hide internal directories.