extension

package
v0.0.0-...-8302c90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuiltinsModule = &object.Module{
	Name: "builtin",
	Members: map[string]object.Object{
		"print":               &object.Function{Name: "print", Fn: Print},
		"eprint":              &object.Function{Name: "eprint", Fn: Eprint},
		"spawn":               &object.Function{Name: "spawn", Fn: Spawn},
		"range":               &object.Function{Name: "range", Fn: Range},
		"max":                 &object.Function{Name: "max", Fn: Max},
		"min":                 &object.Function{Name: "min", Fn: Min},
		"Error":               object.ErrorConstructorFn,
		"TypeError":           object.TypeError,
		"ValueError":          object.ValueError,
		"LookupError":         object.LookupError,
		"ArithmeticError":     object.ArithmeticError,
		"IOError":             object.IOError,
		"ParseError":          object.ParseError,
		"IndexError":          object.IndexError,
		"KeyError":            object.KeyError,
		"ZeroDivisionError":   object.ZeroDivisionError,
		"AttributeError":      object.AttributeError,
		"NameError":           object.NameError,
		"ImportError":         object.ImportError,
		"NotExistError":       object.NotExistError,
		"ExistError":          object.ExistError,
		"PermissionError":     object.PermissionError,
		"TimeoutError":        object.TimeoutError,
		"NetworkError":        object.NetworkError,
		"NotImplementedError": object.NotImplementedError,
		"Int":                 object.IntConstructorFn,
		"Float":               object.FloatConstructorFn,
		"Str":                 object.StrConstructorFn,
		"Bytes":               object.BytesConstructorFn,
		"Bool":                object.BoolConstructorFn,
		"List":                object.ListConstructorFn,
		"Dict":                object.DictConstructorFn,
		"Chan":                object.ChanConstructorFn,
		"Goblin":              object.GoblinConstructorFn,
		"Function":            object.FunctionConstructorFn,
	},
}

Functions

func Eprint

func Eprint(args object.CallArgs) (object.Object, error)

Eprint is like Print, but writes to stderr. Positional-only.

func Max

func Max(args object.CallArgs) (object.Object, error)

func Min

func Min(args object.CallArgs) (object.Object, error)

func Print

func Print(args object.CallArgs) (object.Object, error)

Print writes values to stdout, separated by spaces, ending with a newline. Positional-only.

func Range

func Range(args object.CallArgs) (object.Object, error)

func RangeBounds

func RangeBounds(start, end object.Object) (int64, int64, error)

RangeBounds validates two range arguments through the same parser as the range builtin and returns them as native bounds. The transpiler's specialised for-range loops call this instead of materialising the list, so a bad argument reports exactly the error range() itself would.

func Spawn

func Spawn(args object.CallArgs) (object.Object, error)

spawn launches a goblin function in a new goroutine, passing any extra positional arguments along to it. Goroutines are fire-and-forget: the function's return value and error are discarded, mirroring Go's `go` statement. Use a Chan to communicate results back.

Types

This section is empty.

Directories

Path Synopsis
internal
archive
Package archive holds the plumbing shared by the x/archive modules: the ordered entry list, argument parsing, and the buffer-or-dest sink.
Package archive holds the plumbing shared by the x/archive modules: the ordered entry list, argument parsing, and the buffer-or-dest sink.
compress
Package compress holds the shared plumbing of the whole-value compression modules under x/compress: argument parsing, the common module member set, and the buffer-or-dest write path.
Package compress holds the shared plumbing of the whole-value compression modules under x/compress: argument parsing, the common module member set, and the buffer-or-dest write path.
digest
Package digest holds the argument plumbing shared by the digest and checksum stdlib modules (x/crypto/* and x/hash/*).
Package digest holds the argument plumbing shared by the digest and checksum stdlib modules (x/crypto/* and x/hash/*).
modtest
Package modtest holds the helpers shared by the stdlib module package tests.
Package modtest holds the helpers shared by the stdlib module package tests.
Package regexp exposes Go's RE2-based regular expression engine to Goblin.
Package regexp exposes Go's RE2-based regular expression engine to Goblin.
Package url adapts Go's net/url package to Goblin.
Package url adapts Go's net/url package to Goblin.
x
net/netip
Package netip adapts Go's net/netip value types to Goblin.
Package netip adapts Go's net/netip value types to Goblin.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL