ast

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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) Compile

func (a And) Compile(c *compiler.Compiler) (position int, err error)

func (And) Eval

func (a And) Eval() (obj.Object, error)

func (And) IsConstExpression added in v1.3.0

func (a And) IsConstExpression() bool

func (And) String

func (a And) String() string

type Assign

type Assign struct {
	// contains filtered or unexported fields
}

func (Assign) Compile

func (a Assign) Compile(c *compiler.Compiler) (position int, err error)

func (Assign) Eval

func (a Assign) Eval() (obj.Object, error)

func (Assign) IsConstExpression added in v1.3.0

func (a Assign) IsConstExpression() bool

func (Assign) String

func (a Assign) String() string

type Bang

type Bang struct {
	// contains filtered or unexported fields
}

func (Bang) Compile

func (b Bang) Compile(c *compiler.Compiler) (position int, err error)

func (Bang) Eval

func (b Bang) Eval() (obj.Object, error)

func (Bang) IsConstExpression added in v1.3.0

func (b Bang) IsConstExpression() bool

func (Bang) String

func (b Bang) String() string

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) Eval

func (b BitwiseAnd) Eval() (obj.Object, 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) Eval

func (b BitwiseAndAssign) Eval() (obj.Object, 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) Eval

func (b BitwiseLeftShift) Eval() (obj.Object, 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) Eval

func (b BitwiseNot) Eval() (obj.Object, 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) Compile

func (b BitwiseOr) Compile(c *compiler.Compiler) (position int, err error)

func (BitwiseOr) Eval

func (b BitwiseOr) Eval() (obj.Object, error)

func (BitwiseOr) IsConstExpression added in v1.3.0

func (b BitwiseOr) IsConstExpression() bool

func (BitwiseOr) String

func (b BitwiseOr) String() string

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) Eval

func (b BitwiseOrAssign) Eval() (obj.Object, 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) Eval

func (b BitwiseRightShift) Eval() (obj.Object, 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) Eval

func (b BitwiseShiftLeftAssign) Eval() (obj.Object, 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) Eval

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) Eval

func (b BitwiseXor) Eval() (obj.Object, 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) Eval

func (b BitwiseXorAssign) Eval() (obj.Object, error)

func (BitwiseXorAssign) IsConstExpression added in v1.3.0

func (b BitwiseXorAssign) IsConstExpression() bool

func (BitwiseXorAssign) String

func (b BitwiseXorAssign) String() string

type Block

type Block []Node

func NewBlock

func NewBlock() Block

func (*Block) Add

func (b *Block) Add(n Node)

func (Block) Compile

func (b Block) Compile(c *compiler.Compiler) (position int, err error)

func (Block) Eval

func (b Block) Eval() (obj.Object, error)

func (Block) IsConstExpression added in v1.3.0

func (b Block) IsConstExpression() bool

func (Block) String

func (b Block) String() string

type Boolean

type Boolean bool

func (Boolean) Compile

func (b Boolean) Compile(c *compiler.Compiler) (position int, err error)

func (Boolean) Eval

func (b Boolean) Eval() (obj.Object, error)

func (Boolean) IsConstExpression added in v1.3.0

func (b Boolean) IsConstExpression() bool

func (Boolean) String

func (b Boolean) String() string

type Break

type Break struct{}

func NewBreak

func NewBreak() Break

func (Break) Compile

func (b Break) Compile(c *compiler.Compiler) (position int, err error)

func (Break) Eval

func (b Break) Eval() (obj.Object, error)

func (Break) IsConstExpression added in v1.3.0

func (b Break) IsConstExpression() bool

func (Break) String

func (b Break) String() string

type Call

type Call struct {
	Fn   Node
	Args []Node
	// contains filtered or unexported fields
}

func (Call) Compile

func (c Call) Compile(comp *compiler.Compiler) (position int, err error)

func (Call) Eval

func (c Call) Eval() (obj.Object, error)

func (Call) IsConstExpression added in v1.3.0

func (c Call) IsConstExpression() bool

func (Call) String

func (c Call) String() string

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) Eval added in v1.4.0

func (c ConcurrentCall) Eval() (obj.Object, 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) Compile

func (c Continue) Compile(comp *compiler.Compiler) (position int, err error)

func (Continue) Eval

func (c Continue) Eval() (obj.Object, error)

func (Continue) IsConstExpression added in v1.3.0

func (c Continue) IsConstExpression() bool

func (Continue) String

func (c Continue) String() string

type Definable added in v1.6.0

type Definable interface {
	CompileDefine(c *compiler.Compiler) (position int, err error)
}

type Divide

type Divide struct {
	// contains filtered or unexported fields
}

func (Divide) Compile

func (d Divide) Compile(c *compiler.Compiler) (position int, err error)

func (Divide) Eval

func (d Divide) Eval() (obj.Object, error)

func (Divide) IsConstExpression added in v1.3.0

func (d Divide) IsConstExpression() bool

func (Divide) String

func (d Divide) String() string

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) Eval

func (d DivideAssign) Eval() (obj.Object, 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) Compile

func (d Dot) Compile(c *compiler.Compiler) (position int, err error)

func (Dot) CompileDefine added in v1.6.0

func (d Dot) CompileDefine(c *compiler.Compiler) (position int, err error)

CompileDefine assumes the dot operation is for defining a value.

func (Dot) Eval

func (d Dot) Eval() (obj.Object, error)

func (Dot) IsConstExpression added in v1.3.0

func (d Dot) IsConstExpression() bool

func (Dot) String

func (d Dot) String() string

type Equals

type Equals struct {
	// contains filtered or unexported fields
}

func (Equals) Compile

func (e Equals) Compile(c *compiler.Compiler) (position int, err error)

func (Equals) Eval

func (e Equals) Eval() (obj.Object, error)

func (Equals) IsConstExpression added in v1.3.0

func (e Equals) IsConstExpression() bool

func (Equals) String

func (e Equals) String() string

type Float

type Float float64

func (Float) Compile

func (f Float) Compile(c *compiler.Compiler) (position int, err error)

func (Float) Eval

func (f Float) Eval() (obj.Object, error)

func (Float) IsConstExpression added in v1.3.0

func (f Float) IsConstExpression() bool

func (Float) String

func (f Float) String() string

type For

type For struct {
	// contains filtered or unexported fields
}

func (For) Compile

func (f For) Compile(c *compiler.Compiler) (position int, err error)

func (For) Eval

func (f For) Eval() (obj.Object, error)

func (For) IsConstExpression added in v1.3.0

func (f For) IsConstExpression() bool

func (For) String

func (f For) String() string

type Function

type Function struct {
	Name string
	// contains filtered or unexported fields
}

func (Function) Compile

func (f Function) Compile(c *compiler.Compiler) (position int, err error)

func (Function) Eval

func (f Function) Eval() (obj.Object, error)

func (Function) IsConstExpression added in v1.3.0

func (f Function) IsConstExpression() bool

func (Function) String

func (f Function) String() string

type Greater

type Greater struct {
	// contains filtered or unexported fields
}

func (Greater) Compile

func (g Greater) Compile(c *compiler.Compiler) (position int, err error)

func (Greater) Eval

func (g Greater) Eval() (obj.Object, error)

func (Greater) IsConstExpression added in v1.3.0

func (g Greater) IsConstExpression() bool

func (Greater) String

func (g Greater) String() string

type GreaterEq

type GreaterEq struct {
	// contains filtered or unexported fields
}

func (GreaterEq) Compile

func (g GreaterEq) Compile(c *compiler.Compiler) (position int, err error)

func (GreaterEq) Eval

func (g GreaterEq) Eval() (obj.Object, error)

func (GreaterEq) IsConstExpression added in v1.3.0

func (g GreaterEq) IsConstExpression() bool

func (GreaterEq) String

func (g GreaterEq) String() string

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) Eval

func (i Identifier) Eval() (obj.Object, 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) Compile

func (i IfExpr) Compile(c *compiler.Compiler) (position int, err error)

func (IfExpr) Eval

func (i IfExpr) Eval() (obj.Object, error)

func (IfExpr) IsConstExpression added in v1.3.0

func (i IfExpr) IsConstExpression() bool

func (IfExpr) String

func (i IfExpr) String() string

type Import added in v1.2.0

type Import struct {
	// contains filtered or unexported fields
}

func (Import) Compile added in v1.2.0

func (i Import) Compile(c *compiler.Compiler) (position int, err error)

func (Import) Eval added in v1.2.0

func (i Import) Eval() (obj.Object, error)

func (Import) IsConstExpression added in v1.3.0

func (i Import) IsConstExpression() bool

func (Import) String added in v1.2.0

func (i Import) String() string

type Index

type Index struct {
	// contains filtered or unexported fields
}

func (Index) Compile

func (i Index) Compile(c *compiler.Compiler) (position int, err error)

func (Index) CompileDefine added in v1.6.0

func (i Index) CompileDefine(c *compiler.Compiler) (position int, err error)

CompileDefine assumes the index operation is for defining a value.

func (Index) Eval

func (i Index) Eval() (obj.Object, error)

func (Index) IsConstExpression added in v1.3.0

func (i Index) IsConstExpression() bool

func (Index) String

func (i Index) String() string

type Integer

type Integer int64

func (Integer) Compile

func (i Integer) Compile(c *compiler.Compiler) (position int, err error)

func (Integer) Eval

func (i Integer) Eval() (obj.Object, error)

func (Integer) IsConstExpression added in v1.3.0

func (i Integer) IsConstExpression() bool

func (Integer) String

func (i Integer) String() string

type Less

type Less struct {
	// contains filtered or unexported fields
}

func (Less) Compile

func (l Less) Compile(c *compiler.Compiler) (position int, err error)

func (Less) Eval

func (l Less) Eval() (obj.Object, error)

func (Less) IsConstExpression added in v1.3.0

func (l Less) IsConstExpression() bool

func (Less) String

func (l Less) String() string

type LessEq

type LessEq struct {
	// contains filtered or unexported fields
}

func (LessEq) Compile

func (l LessEq) Compile(c *compiler.Compiler) (position int, err error)

func (LessEq) Eval

func (l LessEq) Eval() (obj.Object, error)

func (LessEq) IsConstExpression added in v1.3.0

func (l LessEq) IsConstExpression() bool

func (LessEq) String

func (l LessEq) String() string

type List

type List []Node

func (List) Compile

func (l List) Compile(c *compiler.Compiler) (position int, err error)

func (List) Eval

func (l List) Eval() (obj.Object, error)

TODO: optimise this for the case where all the list elements are constant expressions.

func (List) IsConstExpression added in v1.3.0

func (l List) IsConstExpression() bool

func (List) String

func (l List) String() string

type Map

type Map struct {
	// contains filtered or unexported fields
}

func (Map) Compile

func (m Map) Compile(c *compiler.Compiler) (position int, err error)

func (Map) Eval

func (m Map) Eval() (obj.Object, error)

func (Map) IsConstExpression added in v1.3.0

func (m Map) IsConstExpression() bool

func (Map) String

func (m Map) String() string

type Minus

type Minus struct {
	// contains filtered or unexported fields
}

func (Minus) Compile

func (m Minus) Compile(c *compiler.Compiler) (position int, err error)

func (Minus) Eval

func (m Minus) Eval() (obj.Object, error)

func (Minus) IsConstExpression added in v1.3.0

func (m Minus) IsConstExpression() bool

func (Minus) String

func (m Minus) String() string

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) Eval

func (m MinusAssign) Eval() (obj.Object, 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) Eval

func (m MinusMinus) Eval() (obj.Object, 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) Compile

func (m Mod) Compile(c *compiler.Compiler) (position int, err error)

func (Mod) Eval

func (m Mod) Eval() (obj.Object, error)

func (Mod) IsConstExpression added in v1.3.0

func (m Mod) IsConstExpression() bool

func (Mod) String

func (m Mod) String() string

type ModAssign

type ModAssign struct {
	// contains filtered or unexported fields
}

func (ModAssign) Compile

func (m ModAssign) Compile(c *compiler.Compiler) (position int, err error)

func (ModAssign) Eval

func (m ModAssign) Eval() (obj.Object, error)

func (ModAssign) IsConstExpression added in v1.3.0

func (m ModAssign) IsConstExpression() bool

func (ModAssign) String

func (m ModAssign) String() string

type Node

type Node interface {
	Eval() (obj.Object, error)
	String() string
	compiler.Compilable
}

func NewAnd

func NewAnd(l, r Node, pos int) Node

func NewAssign

func NewAssign(l, r Node, pos int) Node

func NewBang

func NewBang(n Node, pos int) Node

func NewBitwiseAnd

func NewBitwiseAnd(l, r Node, pos int) Node

func NewBitwiseAndAssign

func NewBitwiseAndAssign(l, r Node, pos int) Node

func NewBitwiseLeftShift

func NewBitwiseLeftShift(l, r Node, pos int) Node

func NewBitwiseNot

func NewBitwiseNot(n Node, pos int) Node

func NewBitwiseOr

func NewBitwiseOr(l, r Node, pos int) Node

func NewBitwiseOrAssign

func NewBitwiseOrAssign(l, r Node, pos int) Node

func NewBitwiseRightShift

func NewBitwiseRightShift(l, r Node, pos int) Node

func NewBitwiseShiftLeftAssign

func NewBitwiseShiftLeftAssign(l, r Node, pos int) Node

func NewBitwiseShiftRightAssign

func NewBitwiseShiftRightAssign(l, r Node, pos int) Node

func NewBitwiseXor

func NewBitwiseXor(l, r Node, pos int) Node

func NewBitwiseXorAssign

func NewBitwiseXorAssign(l, r Node, pos int) Node

func NewBoolean

func NewBoolean(b bool) Node

func NewCall

func NewCall(fn Node, args []Node, pos int) Node

func NewConcurrentCall added in v1.4.0

func NewConcurrentCall(fn Node, args []Node) Node

func NewDivide

func NewDivide(l, r Node, pos int) Node

func NewDivideAssign

func NewDivideAssign(l, r Node, pos int) Node

func NewDot

func NewDot(l, r Node, pos int) Node

func NewEquals

func NewEquals(l, r Node, pos int) Node

func NewFloat

func NewFloat(f float64) Node

func NewFor

func NewFor(cond, body, before, after Node, pos int) Node

func NewFunction

func NewFunction(params []Identifier, body Node, pos int) Node

func NewGreater

func NewGreater(l, r Node, pos int) Node

func NewGreaterEq

func NewGreaterEq(l, r Node, pos int) Node

func NewIfExpr

func NewIfExpr(cond, body, alt Node, pos int) Node

func NewImport added in v1.2.0

func NewImport(name Node, parse parseFn, pos int) Node

func NewIndex

func NewIndex(l, i Node, pos int) Node

func NewInteger

func NewInteger(i int64) Node

func NewLess

func NewLess(l, r Node, pos int) Node

func NewLessEq

func NewLessEq(l, r Node, pos int) Node

func NewList

func NewList(elements ...Node) Node

func NewMap

func NewMap(pos int, pairs ...[2]Node) Node

func NewMinus

func NewMinus(l, r Node, pos int) Node

func NewMinusAssign

func NewMinusAssign(l, r Node, pos int) Node

func NewMinusMinus

func NewMinusMinus(r Node, pos int) Node

func NewMod

func NewMod(l, r Node, pos int) Node

func NewModAssign

func NewModAssign(l, r Node, pos int) Node

func NewNotEquals

func NewNotEquals(l, r Node, pos int) Node

func NewOr

func NewOr(l, r Node, pos int) Node

func NewPlus

func NewPlus(l, r Node, pos int) Node

func NewPlusAssign

func NewPlusAssign(l, r Node, pos int) Node

func NewPlusPlus

func NewPlusPlus(r Node, pos int) Node

func NewPrefixMinus

func NewPrefixMinus(n Node, pos int) Node

func NewRawString

func NewRawString(s string) Node

func NewReturn

func NewReturn(n Node, pos int) Node

func NewString

func NewString(file, s string, parse parseFn, pos int) (Node, error)

func NewTimes

func NewTimes(l, r Node, pos int) Node

func NewTimesAssign

func NewTimesAssign(l, r Node, pos int) Node

type NotEquals

type NotEquals struct {
	// contains filtered or unexported fields
}

func (NotEquals) Compile

func (n NotEquals) Compile(c *compiler.Compiler) (position int, err error)

func (NotEquals) Eval

func (n NotEquals) Eval() (obj.Object, error)

func (NotEquals) IsConstExpression added in v1.3.0

func (n NotEquals) IsConstExpression() bool

func (NotEquals) String

func (n NotEquals) String() string

type Null

type Null struct{}

func NewNull

func NewNull() Null

func (Null) Compile

func (n Null) Compile(c *compiler.Compiler) (position int, err error)

func (Null) Eval

func (n Null) Eval() (obj.Object, error)

func (Null) IsConstExpression added in v1.3.0

func (n Null) IsConstExpression() bool

func (Null) String

func (n Null) String() string

type Or

type Or struct {
	// contains filtered or unexported fields
}

func (Or) Compile

func (o Or) Compile(c *compiler.Compiler) (position int, err error)

func (Or) Eval

func (o Or) Eval() (obj.Object, error)

func (Or) IsConstExpression added in v1.3.0

func (o Or) IsConstExpression() bool

func (Or) String

func (o Or) String() string

type Plus

type Plus struct {
	// contains filtered or unexported fields
}

func (Plus) Compile

func (p Plus) Compile(c *compiler.Compiler) (position int, err error)

func (Plus) Eval

func (p Plus) Eval() (obj.Object, error)

func (Plus) IsConstExpression added in v1.3.0

func (p Plus) IsConstExpression() bool

func (Plus) String

func (p Plus) String() string

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) Eval

func (p PlusAssign) Eval() (obj.Object, 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) Eval

func (p PrefixMinus) Eval() (obj.Object, 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) Compile

func (r RawString) Compile(c *compiler.Compiler) (position int, err error)

func (RawString) Eval

func (r RawString) Eval() (obj.Object, error)

func (RawString) IsConstExpression added in v1.3.0

func (r RawString) IsConstExpression() bool

func (RawString) Quoted

func (r RawString) Quoted() string

func (RawString) String

func (r RawString) String() string

type Return

type Return struct {
	// contains filtered or unexported fields
}

func (Return) Compile

func (r Return) Compile(c *compiler.Compiler) (position int, err error)

func (Return) Eval

func (r Return) Eval() (obj.Object, error)

func (Return) IsConstExpression added in v1.3.0

func (r Return) IsConstExpression() bool

func (Return) String

func (r Return) String() string

type String

type String struct {
	// contains filtered or unexported fields
}

func (String) Compile

func (s String) Compile(c *compiler.Compiler) (position int, err error)

func (String) Eval

func (s String) Eval() (obj.Object, error)

func (String) IsConstExpression added in v1.3.0

func (s String) IsConstExpression() bool

func (String) Quoted

func (s String) Quoted() string

func (String) String

func (s String) String() string

type Times

type Times struct {
	// contains filtered or unexported fields
}

func (Times) Compile

func (t Times) Compile(c *compiler.Compiler) (position int, err error)

func (Times) Eval

func (t Times) Eval() (obj.Object, error)

func (Times) IsConstExpression added in v1.3.0

func (t Times) IsConstExpression() bool

func (Times) String

func (t Times) String() string

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) Eval

func (t TimesAssign) Eval() (obj.Object, error)

func (TimesAssign) IsConstExpression added in v1.3.0

func (t TimesAssign) IsConstExpression() bool

func (TimesAssign) String

func (t TimesAssign) String() string

Jump to

Keyboard shortcuts

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