define

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: EUPL-1.2 Imports: 4 Imported by: 0

Documentation

Overview

Package define contains all syntaxes and builtins to bind values to symbols.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefineS

func DefineS(eng *eval.Engine, env sxpf.Environment, args *sxpf.List) (eval.Expr, error)

DefineS parses a (define name value) form.

func SetXS

func SetXS(eng *eval.Engine, env sxpf.Environment, args *sxpf.List) (eval.Expr, error)

DefineSyntax parses a (define name value) form.

Types

type DefineExpr

type DefineExpr struct {
	Sym *sxpf.Symbol
	Val eval.Expr
}

DefineExpr stores data for a define statement.

func (*DefineExpr) Compute

func (de *DefineExpr) Compute(eng *eval.Engine, env sxpf.Environment) (sxpf.Object, error)

type SetXExpr

type SetXExpr struct {
	Sym *sxpf.Symbol
	Val eval.Expr
}

SetXExpr stores data for a set! statement.

func (*SetXExpr) Compute

func (se *SetXExpr) Compute(eng *eval.Engine, env sxpf.Environment) (sxpf.Object, error)

Jump to

Keyboard shortcuts

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