common

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeError

func MakeError(err string, inner error) error

func Qstringify added in v0.4.2

func Qstringify(v any) string

func Stringify added in v0.4.2

func Stringify(v any) string

Types

type BuiltIn

type BuiltIn map[string]func(context *Context, args []NamedValue) (any, error)

type Context

type Context struct {
	Locals    *s.Stack[*Locals]
	BuiltIn   BuiltIn
	System    System
	PathStack *s.Stack[string]
}

type KeyValue added in v0.4.2

type KeyValue[K any, V any] struct {
	Key   K
	Value V
}

type LikeError

type LikeError struct {
	ErrorText  string
	InnerError error
}

func (*LikeError) Error

func (a *LikeError) Error() string

type List added in v0.4.2

type List []any

type Locals added in v0.3.10

type Locals struct {
	Store  Store
	Input  string
	Output strings.Builder
}

func MakeLocals added in v0.3.10

func MakeLocals(store Store) *Locals

type NamedValue added in v0.4.2

type NamedValue KeyValue[string, any]

func (NamedValue) String added in v0.4.2

func (a NamedValue) String() string

type Store

type Store map[string]any

func CopyStore added in v0.3.11

func CopyStore(m map[string]interface{}) Store

type System

type System interface {
	OutputText(text string)
	OutputError(text string)
	ResolvePath(context *Context, filePath string) (string, error)
}

Jump to

Keyboard shortcuts

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