Versions in this module Expand all Collapse all v0 v0.0.1 Jun 23, 2026 Changes in this version + func NewException(message string) string + type Context struct + Get map[string]string + Headers map[string]string + Path map[string]string + Post map[string]string + func FromRequest(r *http.Request) Context + func NewContext() Context + func (c Context) GetAllHeaders() *model.Array + func (c Context) Header(header string, opts ...any) + func (c Context) Register(rt *Runtime) + func (c Context) ResponseHeaders() http.Header + type ExitError struct + Code int + func IsExit(err error) (*ExitError, bool) + func (e *ExitError) Error() string + type ExprCache struct + func NewExprCache() *ExprCache + func (c *ExprCache) Get(e model.Expr) (*compiledExpr, bool) + func (c *ExprCache) GetSource(src string) (*compiledExpr, bool) + func (c *ExprCache) Set(e model.Expr, ce *compiledExpr) + type IncludeCache struct + func NewIncludeCache() *IncludeCache + func (c *IncludeCache) Get(path string) (*model.Program, bool) + func (c *IncludeCache) Set(path string, prog *model.Program) + type IncludeFunc func(path string) (*model.Program, error) + type Options struct + RootFS fs.FS + SAPI string + WorkDir string + WritablePaths []string + type Runtime struct + func New(w io.Writer, opts Options) *Runtime + func (r *Runtime) SAPI() string + func (rt *Runtime) Const(name string) (any, bool) + func (rt *Runtime) Eval(e model.Expr, scope *Scope) (any, error) + func (rt *Runtime) Exit(code int) error + func (rt *Runtime) FS() fs.FS + func (rt *Runtime) IncludedFiles() []string + func (rt *Runtime) Load(src string) (*model.Program, error) + func (rt *Runtime) LoadFile(path string) (*model.Program, error) + func (rt *Runtime) OnError(fn func(error)) + func (rt *Runtime) RegisterClass(c *model.Class) + func (rt *Runtime) RegisterConstructor(name string, ctor any) + func (rt *Runtime) RegisterFunc(name string, fn any) + func (rt *Runtime) Run(p *model.Program) error + func (rt *Runtime) SetConst(name string, val any) + func (rt *Runtime) SetContext(ctx context.Context) + func (rt *Runtime) SetExprCache(cache *ExprCache) + func (rt *Runtime) SetGlobal(name string, val any) + func (rt *Runtime) SetIncludeCache(cache *IncludeCache) + func (rt *Runtime) SetIncludeResolver(fn IncludeFunc) + func (rt *Runtime) WorkDir() string + func (rt *Runtime) WritablePaths() []string + type Scope struct + func NewScope() *Scope + func (s *Scope) Get(name string) (any, bool) + func (s *Scope) Set(name string, val any) + type Transpiler struct + func NewTranspiler() *Transpiler + func (t *Transpiler) Closures() map[string]*model.Closure + func (t *Transpiler) Transpile(e model.Expr) (src string, vars []string, err error)