Documentation ¶
Index ¶
- type And
- type Assign
- type Bang
- type BitwiseAnd
- type BitwiseAndAssign
- type BitwiseLeftShift
- type BitwiseNot
- type BitwiseOr
- type BitwiseOrAssign
- type BitwiseRightShift
- type BitwiseShiftLeftAssign
- type BitwiseShiftRightAssign
- type BitwiseXor
- type BitwiseXorAssign
- type Block
- type Boolean
- type Break
- type Call
- type ConcurrentCall
- type Continue
- type Definable
- type Divide
- type DivideAssign
- type Dot
- type Equals
- type Float
- type For
- type Function
- type Greater
- type GreaterEq
- type Identifier
- type IfExpr
- type Import
- type Index
- type Integer
- type Less
- type LessEq
- type List
- type Map
- type Minus
- type MinusAssign
- type MinusMinus
- type Mod
- type ModAssign
- type Node
- func NewAnd(l, r Node, pos int) Node
- func NewAssign(l, r Node, pos int) Node
- func NewBang(n Node, pos int) Node
- func NewBitwiseAnd(l, r Node, pos int) Node
- func NewBitwiseAndAssign(l, r Node, pos int) Node
- func NewBitwiseLeftShift(l, r Node, pos int) Node
- func NewBitwiseNot(n Node, pos int) Node
- func NewBitwiseOr(l, r Node, pos int) Node
- func NewBitwiseOrAssign(l, r Node, pos int) Node
- func NewBitwiseRightShift(l, r Node, pos int) Node
- func NewBitwiseShiftLeftAssign(l, r Node, pos int) Node
- func NewBitwiseShiftRightAssign(l, r Node, pos int) Node
- func NewBitwiseXor(l, r Node, pos int) Node
- func NewBitwiseXorAssign(l, r Node, pos int) Node
- func NewBoolean(b bool) Node
- func NewCall(fn Node, args []Node, pos int) Node
- func NewConcurrentCall(fn Node, args []Node) Node
- func NewDivide(l, r Node, pos int) Node
- func NewDivideAssign(l, r Node, pos int) Node
- func NewDot(l, r Node, pos int) Node
- func NewEquals(l, r Node, pos int) Node
- func NewFloat(f float64) Node
- func NewFor(cond, body, before, after Node, pos int) Node
- func NewFunction(params []Identifier, body Node, pos int) Node
- func NewGreater(l, r Node, pos int) Node
- func NewGreaterEq(l, r Node, pos int) Node
- func NewIfExpr(cond, body, alt Node, pos int) Node
- func NewImport(name Node, parse parseFn, pos int) Node
- func NewIndex(l, i Node, pos int) Node
- func NewInteger(i int64) Node
- func NewLess(l, r Node, pos int) Node
- func NewLessEq(l, r Node, pos int) Node
- func NewList(elements ...Node) Node
- func NewMap(pos int, pairs ...[2]Node) Node
- func NewMinus(l, r Node, pos int) Node
- func NewMinusAssign(l, r Node, pos int) Node
- func NewMinusMinus(r Node, pos int) Node
- func NewMod(l, r Node, pos int) Node
- func NewModAssign(l, r Node, pos int) Node
- func NewNotEquals(l, r Node, pos int) Node
- func NewOr(l, r Node, pos int) Node
- func NewPlus(l, r Node, pos int) Node
- func NewPlusAssign(l, r Node, pos int) Node
- func NewPlusPlus(r Node, pos int) Node
- func NewPrefixMinus(n Node, pos int) Node
- func NewRawString(s string) Node
- func NewReturn(n Node, pos int) Node
- func NewString(file, s string, parse parseFn, pos int) (Node, error)
- func NewTimes(l, r Node, pos int) Node
- func NewTimesAssign(l, r Node, pos int) Node
- type NotEquals
- type Null
- type Or
- type Plus
- type PlusAssign
- type PrefixMinus
- type RawString
- type Return
- type String
- type Times
- type TimesAssign
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type And ¶
type And struct {
// contains filtered or unexported fields
}
func (And) IsConstExpression ¶ added in v1.3.0
type Assign ¶
type Assign struct {
// contains filtered or unexported fields
}
func (Assign) IsConstExpression ¶ added in v1.3.0
type Bang ¶
type Bang struct {
// contains filtered or unexported fields
}
func (Bang) IsConstExpression ¶ added in v1.3.0
type BitwiseAnd ¶
type BitwiseAnd struct {
// contains filtered or unexported fields
}
func (BitwiseAnd) Compile ¶
func (b BitwiseAnd) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseAnd) IsConstExpression ¶ added in v1.3.0
func (b BitwiseAnd) IsConstExpression() bool
func (BitwiseAnd) String ¶
func (b BitwiseAnd) String() string
type BitwiseAndAssign ¶
type BitwiseAndAssign struct {
// contains filtered or unexported fields
}
func (BitwiseAndAssign) Compile ¶
func (b BitwiseAndAssign) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseAndAssign) IsConstExpression ¶ added in v1.3.0
func (b BitwiseAndAssign) IsConstExpression() bool
func (BitwiseAndAssign) String ¶
func (b BitwiseAndAssign) String() string
type BitwiseLeftShift ¶
type BitwiseLeftShift struct {
// contains filtered or unexported fields
}
func (BitwiseLeftShift) Compile ¶
func (b BitwiseLeftShift) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseLeftShift) IsConstExpression ¶ added in v1.3.0
func (b BitwiseLeftShift) IsConstExpression() bool
func (BitwiseLeftShift) String ¶
func (b BitwiseLeftShift) String() string
type BitwiseNot ¶
type BitwiseNot struct {
// contains filtered or unexported fields
}
func (BitwiseNot) Compile ¶
func (b BitwiseNot) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseNot) IsConstExpression ¶ added in v1.3.0
func (b BitwiseNot) IsConstExpression() bool
func (BitwiseNot) String ¶
func (b BitwiseNot) String() string
type BitwiseOr ¶
type BitwiseOr struct {
// contains filtered or unexported fields
}
func (BitwiseOr) IsConstExpression ¶ added in v1.3.0
type BitwiseOrAssign ¶
type BitwiseOrAssign struct {
// contains filtered or unexported fields
}
func (BitwiseOrAssign) Compile ¶
func (b BitwiseOrAssign) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseOrAssign) IsConstExpression ¶ added in v1.3.0
func (b BitwiseOrAssign) IsConstExpression() bool
func (BitwiseOrAssign) String ¶
func (b BitwiseOrAssign) String() string
type BitwiseRightShift ¶
type BitwiseRightShift struct {
// contains filtered or unexported fields
}
func (BitwiseRightShift) Compile ¶
func (b BitwiseRightShift) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseRightShift) IsConstExpression ¶ added in v1.3.0
func (b BitwiseRightShift) IsConstExpression() bool
func (BitwiseRightShift) String ¶
func (b BitwiseRightShift) String() string
type BitwiseShiftLeftAssign ¶
type BitwiseShiftLeftAssign struct {
// contains filtered or unexported fields
}
func (BitwiseShiftLeftAssign) Compile ¶
func (b BitwiseShiftLeftAssign) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseShiftLeftAssign) IsConstExpression ¶ added in v1.3.0
func (b BitwiseShiftLeftAssign) IsConstExpression() bool
func (BitwiseShiftLeftAssign) String ¶
func (b BitwiseShiftLeftAssign) String() string
type BitwiseShiftRightAssign ¶
type BitwiseShiftRightAssign struct {
// contains filtered or unexported fields
}
func (BitwiseShiftRightAssign) Compile ¶
func (b BitwiseShiftRightAssign) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseShiftRightAssign) IsConstExpression ¶ added in v1.3.0
func (b BitwiseShiftRightAssign) IsConstExpression() bool
func (BitwiseShiftRightAssign) String ¶
func (b BitwiseShiftRightAssign) String() string
type BitwiseXor ¶
type BitwiseXor struct {
// contains filtered or unexported fields
}
func (BitwiseXor) Compile ¶
func (b BitwiseXor) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseXor) IsConstExpression ¶ added in v1.3.0
func (b BitwiseXor) IsConstExpression() bool
func (BitwiseXor) String ¶
func (b BitwiseXor) String() string
type BitwiseXorAssign ¶
type BitwiseXorAssign struct {
// contains filtered or unexported fields
}
func (BitwiseXorAssign) Compile ¶
func (b BitwiseXorAssign) Compile(c *compiler.Compiler) (position int, err error)
func (BitwiseXorAssign) IsConstExpression ¶ added in v1.3.0
func (b BitwiseXorAssign) IsConstExpression() bool
func (BitwiseXorAssign) String ¶
func (b BitwiseXorAssign) String() string
type Call ¶
func (Call) IsConstExpression ¶ added in v1.3.0
type ConcurrentCall ¶ added in v1.4.0
type ConcurrentCall struct {
// contains filtered or unexported fields
}
func (ConcurrentCall) Compile ¶ added in v1.4.0
func (c ConcurrentCall) Compile(comp *compiler.Compiler) (position int, err error)
func (ConcurrentCall) IsConstExpression ¶ added in v1.4.0
func (ConcurrentCall) IsConstExpression() bool
func (ConcurrentCall) String ¶ added in v1.4.0
func (c ConcurrentCall) String() string
type Continue ¶
type Continue struct{}
func NewContinue ¶
func NewContinue() Continue
func (Continue) IsConstExpression ¶ added in v1.3.0
type Divide ¶
type Divide struct {
// contains filtered or unexported fields
}
func (Divide) IsConstExpression ¶ added in v1.3.0
type DivideAssign ¶
type DivideAssign struct {
// contains filtered or unexported fields
}
func (DivideAssign) Compile ¶
func (d DivideAssign) Compile(c *compiler.Compiler) (position int, err error)
func (DivideAssign) IsConstExpression ¶ added in v1.3.0
func (d DivideAssign) IsConstExpression() bool
func (DivideAssign) String ¶
func (d DivideAssign) String() string
type Dot ¶
type Dot struct {
// contains filtered or unexported fields
}
func (Dot) CompileDefine ¶ added in v1.6.0
CompileDefine assumes the dot operation is for defining a value.
func (Dot) IsConstExpression ¶ added in v1.3.0
type Equals ¶
type Equals struct {
// contains filtered or unexported fields
}
func (Equals) IsConstExpression ¶ added in v1.3.0
type For ¶
type For struct {
// contains filtered or unexported fields
}
func (For) IsConstExpression ¶ added in v1.3.0
type Function ¶
type Function struct { Name string // contains filtered or unexported fields }
func (Function) IsConstExpression ¶ added in v1.3.0
type Greater ¶
type Greater struct {
// contains filtered or unexported fields
}
func (Greater) IsConstExpression ¶ added in v1.3.0
type GreaterEq ¶
type GreaterEq struct {
// contains filtered or unexported fields
}
func (GreaterEq) IsConstExpression ¶ added in v1.3.0
type Identifier ¶
type Identifier struct {
// contains filtered or unexported fields
}
func NewIdentifier ¶
func NewIdentifier(name string, pos int) Identifier
func (Identifier) Compile ¶
func (i Identifier) Compile(c *compiler.Compiler) (position int, err error)
func (Identifier) IsConstExpression ¶ added in v1.3.0
func (i Identifier) IsConstExpression() bool
func (Identifier) String ¶
func (i Identifier) String() string
type IfExpr ¶
type IfExpr struct {
// contains filtered or unexported fields
}
func (IfExpr) IsConstExpression ¶ added in v1.3.0
type Import ¶ added in v1.2.0
type Import struct {
// contains filtered or unexported fields
}
func (Import) IsConstExpression ¶ added in v1.3.0
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (Index) CompileDefine ¶ added in v1.6.0
CompileDefine assumes the index operation is for defining a value.
func (Index) IsConstExpression ¶ added in v1.3.0
type Less ¶
type Less struct {
// contains filtered or unexported fields
}
func (Less) IsConstExpression ¶ added in v1.3.0
type LessEq ¶
type LessEq struct {
// contains filtered or unexported fields
}
func (LessEq) IsConstExpression ¶ added in v1.3.0
type List ¶
type List []Node
func (List) Eval ¶
TODO: optimise this for the case where all the list elements are constant expressions.
func (List) IsConstExpression ¶ added in v1.3.0
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (Map) IsConstExpression ¶ added in v1.3.0
type Minus ¶
type Minus struct {
// contains filtered or unexported fields
}
func (Minus) IsConstExpression ¶ added in v1.3.0
type MinusAssign ¶
type MinusAssign struct {
// contains filtered or unexported fields
}
func (MinusAssign) Compile ¶
func (m MinusAssign) Compile(c *compiler.Compiler) (position int, err error)
func (MinusAssign) IsConstExpression ¶ added in v1.3.0
func (m MinusAssign) IsConstExpression() bool
func (MinusAssign) String ¶
func (m MinusAssign) String() string
type MinusMinus ¶
type MinusMinus struct {
// contains filtered or unexported fields
}
func (MinusMinus) Compile ¶
func (m MinusMinus) Compile(c *compiler.Compiler) (position int, err error)
func (MinusMinus) IsConstExpression ¶ added in v1.3.0
func (m MinusMinus) IsConstExpression() bool
func (MinusMinus) String ¶
func (m MinusMinus) String() string
type Mod ¶
type Mod struct {
// contains filtered or unexported fields
}
func (Mod) IsConstExpression ¶ added in v1.3.0
type ModAssign ¶
type ModAssign struct {
// contains filtered or unexported fields
}
func (ModAssign) IsConstExpression ¶ added in v1.3.0
type Node ¶
func NewBitwiseAnd ¶
func NewBitwiseAndAssign ¶
func NewBitwiseLeftShift ¶
func NewBitwiseNot ¶
func NewBitwiseOr ¶
func NewBitwiseOrAssign ¶
func NewBitwiseRightShift ¶
func NewBitwiseXor ¶
func NewBitwiseXorAssign ¶
func NewBoolean ¶
func NewConcurrentCall ¶ added in v1.4.0
func NewDivideAssign ¶
func NewFunction ¶
func NewFunction(params []Identifier, body Node, pos int) Node
func NewGreater ¶
func NewGreaterEq ¶
func NewInteger ¶
func NewMinusAssign ¶
func NewMinusMinus ¶
func NewModAssign ¶
func NewNotEquals ¶
func NewPlusAssign ¶
func NewPlusPlus ¶
func NewPrefixMinus ¶
func NewRawString ¶
func NewTimesAssign ¶
type NotEquals ¶
type NotEquals struct {
// contains filtered or unexported fields
}
func (NotEquals) IsConstExpression ¶ added in v1.3.0
type Or ¶
type Or struct {
// contains filtered or unexported fields
}
func (Or) IsConstExpression ¶ added in v1.3.0
type Plus ¶
type Plus struct {
// contains filtered or unexported fields
}
func (Plus) IsConstExpression ¶ added in v1.3.0
type PlusAssign ¶
type PlusAssign struct {
// contains filtered or unexported fields
}
func (PlusAssign) Compile ¶
func (p PlusAssign) Compile(c *compiler.Compiler) (position int, err error)
func (PlusAssign) IsConstExpression ¶ added in v1.3.0
func (p PlusAssign) IsConstExpression() bool
func (PlusAssign) String ¶
func (p PlusAssign) String() string
type PrefixMinus ¶
type PrefixMinus struct {
// contains filtered or unexported fields
}
func (PrefixMinus) Compile ¶
func (p PrefixMinus) Compile(c *compiler.Compiler) (position int, err error)
func (PrefixMinus) IsConstExpression ¶ added in v1.3.0
func (p PrefixMinus) IsConstExpression() bool
func (PrefixMinus) String ¶
func (p PrefixMinus) String() string
type RawString ¶
type RawString string
func (RawString) IsConstExpression ¶ added in v1.3.0
type Return ¶
type Return struct {
// contains filtered or unexported fields
}
func (Return) IsConstExpression ¶ added in v1.3.0
type String ¶
type String struct {
// contains filtered or unexported fields
}
func (String) IsConstExpression ¶ added in v1.3.0
type Times ¶
type Times struct {
// contains filtered or unexported fields
}
func (Times) IsConstExpression ¶ added in v1.3.0
type TimesAssign ¶
type TimesAssign struct {
// contains filtered or unexported fields
}
func (TimesAssign) Compile ¶
func (t TimesAssign) Compile(c *compiler.Compiler) (position int, err error)
func (TimesAssign) IsConstExpression ¶ added in v1.3.0
func (t TimesAssign) IsConstExpression() bool
func (TimesAssign) String ¶
func (t TimesAssign) String() string
Source Files ¶
- and.go
- assign.go
- bang.go
- bitwiseand.go
- bitwiseandassign.go
- bitwisenot.go
- bitwiseor.go
- bitwiseorassign.go
- bitwiseshiftleft.go
- bitwiseshiftleftassign.go
- bitwiseshiftright.go
- bitwiseshiftrightassign.go
- bitwisexor.go
- bitwisexorassign.go
- block.go
- boolean.go
- break.go
- call.go
- concurrentcall.go
- continue.go
- divide.go
- divideassign.go
- dot.go
- equals.go
- float.go
- for.go
- function.go
- greater.go
- greatereq.go
- identifier.go
- ifelse.go
- import.go
- index.go
- integer.go
- less.go
- lesseq.go
- list.go
- map.go
- minus.go
- minusassign.go
- minusminus.go
- mod.go
- modassign.go
- node.go
- notequals.go
- null.go
- or.go
- plus.go
- plusassign.go
- plusplus.go
- prefixmin.go
- rawstring.go
- return.go
- string.go
- times.go
- timesassign.go
Click to show internal directories.
Click to hide internal directories.