Documentation
¶
Index ¶
- Constants
- func BoolOf(v Val) bool
- func CheckSize(m map[Var]Val) (total int64)
- func FreeVars(e Expr) map[string]struct{}
- func FuncParamsPrepend(p, ps Attrib) ([]string, error)
- func HasSideEffects(e Expr) bool
- func UsedVars(b Block) map[string]struct{}
- type Arg
- type Assn
- type Attrib
- type BinOp
- type Block
- type Call
- type CallArgs
- type Context
- type Expr
- func BlockPrepend(e, b Attrib) (Expr, error)
- func NewAnd(a, b Attrib) (Expr, error)
- func NewArg(i Attrib) (Expr, error)
- func NewAssn(v, e Attrib) (Expr, error)
- func NewBlock() (Expr, error)
- func NewCall(f, as Attrib) (Expr, error)
- func NewConcat(a, b Attrib) (Expr, error)
- func NewEquals(a, b Attrib) (Expr, error)
- func NewIfElse(c, t, e Attrib) (Expr, error)
- func NewIndex(s, i Attrib) (Expr, error)
- func NewIndexInt(s, i Attrib) (Expr, error)
- func NewLambda(ps, b Attrib) (Expr, error)
- func NewNotEquals(a, b Attrib) (Expr, error)
- func NewOr(a, b Attrib) (Expr, error)
- func NewProgram(f, b Attrib) (Expr, error)
- func NewVal(a Attrib) (Expr, error)
- func NewVar(a Attrib) (Expr, error)
- func NewWhile(c, b Attrib) (Expr, error)
- type FuncDecl
- type IfElse
- type Index
- type Lambda
- type Op
- type Program
- type Set
- func (s Set) Add(els ...string)
- func (s Set) Contains(v string) bool
- func (s Set) Copy() Set
- func (s Set) Equals(s2 Set) bool
- func (s Set) Except(s2 Set) Set
- func (s Set) ExceptCopy(s2 Set) Set
- func (s Set) Intersect(s2 Set) Set
- func (s Set) IntersectCopy(s2 Set) Set
- func (s Set) String() string
- func (s Set) Union(s2 Set) Set
- func (s Set) UnionCopy(s2 Set) Set
- type Val
- type Var
- type While
Constants ¶
View Source
const ( SigExternalExit = iota + 1 SigOutOfMemory )
View Source
const GoStackframeEstimate = 8 * 1024
View Source
const LeafPrecedence int = 100
Variables ¶
This section is empty.
Functions ¶
func FuncParamsPrepend ¶ added in v0.2.0
func HasSideEffects ¶ added in v0.5.0
Types ¶
type Assn ¶
func (Assn) Precedence ¶ added in v0.5.1
type BinOp ¶ added in v0.5.1
func (BinOp) Precedence ¶ added in v0.5.1
type Call ¶
func (Call) Precedence ¶ added in v0.5.1
type CallArgs ¶ added in v0.2.0
type CallArgs []Expr
CallArgs is not an Expr, since it can never appear on its own
func CallArgsPrepend ¶ added in v0.2.0
func NewCallArgs ¶ added in v0.2.0
type Context ¶
type Context struct { Args []string VariableMap map[Var]Val FunctionMap map[string]func([]string) string UserFunctionMap map[string]FuncDecl MaxStackSize int64 // contains filtered or unexported fields }
func NewContext ¶
func (*Context) GetExitChannel ¶ added in v0.3.0
func (*Context) SetMaxStackSize ¶ added in v0.3.2
type Expr ¶
func BlockPrepend ¶ added in v0.2.0
func NewIndexInt ¶
func NewNotEquals ¶
func NewProgram ¶ added in v0.2.0
type FuncDecl ¶ added in v0.2.0
FuncDecl is not an Expr, since it can never appear on its own
func FuncDeclsAppend ¶ added in v0.2.0
func NewFuncDecl ¶ added in v0.2.0
type IfElse ¶
func (IfElse) Precedence ¶ added in v0.5.1
type Index ¶
func (Index) Precedence ¶ added in v0.5.1
type Lambda ¶ added in v0.5.0
func (Lambda) Precedence ¶ added in v0.5.1
type Program ¶ added in v0.2.0
func (Program) Precedence ¶ added in v0.5.1
type Set ¶ added in v0.5.1
type Set map[string]struct{}
func DefinedVars ¶ added in v0.5.1
func UsedBeforeDefVars ¶ added in v0.5.1
func (Set) ExceptCopy ¶ added in v0.5.1
func (Set) IntersectCopy ¶ added in v0.5.1
type Var ¶
type Var string
func (Var) Eval ¶
TODO: Make Vars and FuncDecls/Calls be linked: if you call a Var that isn't a function, interpret it as one Multiple possibilities: allow reusing same context, maybe instead of fun(a, b, c) args you just use $0, $1, $3 etc
func (Var) Precedence ¶ added in v0.5.1
Click to show internal directories.
Click to hide internal directories.