Documentation ¶
Index ¶
- Constants
- type Array
- type ArrayAccess
- type Boolean
- type Builtin
- type Chunk
- type Compiler
- type Expression
- type FunctionCall
- type Identifier
- type InfixExpression
- type Integer
- type Node
- type Numeric
- type Precedence
- type PrefixExpression
- type Range
- type Stack
- type StringLiteral
- type VM
- type VariableAccess
- type WrappedExpression
Constants ¶
View Source
const ( OpConstant = iota OpEqual OpNotEqual OpGreaterThan OpGreaterThanOrEqual OpLessThan OpLessThanOrEqual OpAdd OpSubtract OpMultiply OpDivide OpExponent OpAnd OpOr OpNot OpNegate OpGet OpCall OpBuiltin1 OpBuiltin2 OpBuiltin3 OpArrayAccess OpChain OpArray OpIn OpCodeCount )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct { Items []Expression Token *tokenizer.Token }
type ArrayAccess ¶
type ArrayAccess struct { Accessed Expression Index Expression Token *tokenizer.Token }
func (*ArrayAccess) IsEqual ¶
func (s *ArrayAccess) IsEqual(node Node) bool
func (*ArrayAccess) Literal ¶
func (s *ArrayAccess) Literal() string
func (*ArrayAccess) String ¶
func (s *ArrayAccess) String() string
func (*ArrayAccess) Type ¶
func (s *ArrayAccess) Type() string
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func NewCompiler ¶
func NewCompiler(expr Expression) *Compiler
type Expression ¶
type FunctionCall ¶
type FunctionCall struct { Called Expression Args []Expression Token *tokenizer.Token }
func (*FunctionCall) IsEqual ¶
func (s *FunctionCall) IsEqual(node Node) bool
func (*FunctionCall) Literal ¶
func (s *FunctionCall) Literal() string
func (*FunctionCall) String ¶
func (s *FunctionCall) String() string
func (*FunctionCall) Type ¶
func (s *FunctionCall) Type() string
type Identifier ¶
func (*Identifier) IsEqual ¶
func (s *Identifier) IsEqual(node Node) bool
func (*Identifier) Literal ¶
func (s *Identifier) Literal() string
func (*Identifier) String ¶
func (s *Identifier) String() string
func (*Identifier) Type ¶
func (s *Identifier) Type() string
type InfixExpression ¶
type InfixExpression struct { Token *tokenizer.Token Op string Left Expression Right Expression }
func (*InfixExpression) IsEqual ¶
func (s *InfixExpression) IsEqual(node Node) bool
func (*InfixExpression) Literal ¶
func (s *InfixExpression) Literal() string
func (*InfixExpression) String ¶
func (s *InfixExpression) String() string
func (*InfixExpression) Type ¶
func (s *InfixExpression) Type() string
type Precedence ¶
type Precedence int
const ( PrecLowest Precedence PrecOr PrecAnd PrecEqual PrecLessGreater PrecInclusion PrecSets PrecInfix PrecMultiply PrecPower PrecPrefix PrecCall PrecChain )
type PrefixExpression ¶
type PrefixExpression struct { Token *tokenizer.Token Op string Action string Right Expression }
func (*PrefixExpression) IsEqual ¶
func (s *PrefixExpression) IsEqual(node Node) bool
func (*PrefixExpression) Literal ¶
func (s *PrefixExpression) Literal() string
func (*PrefixExpression) String ¶
func (s *PrefixExpression) String() string
func (*PrefixExpression) Type ¶
func (s *PrefixExpression) Type() string
type Range ¶
type Range struct { Start Expression End Expression Token *tokenizer.Token }
type StringLiteral ¶
func (*StringLiteral) IsEqual ¶
func (s *StringLiteral) IsEqual(node Node) bool
func (*StringLiteral) Literal ¶
func (s *StringLiteral) Literal() string
func (*StringLiteral) String ¶
func (s *StringLiteral) String() string
func (*StringLiteral) Type ¶
func (s *StringLiteral) Type() string
type VariableAccess ¶
type VariableAccess struct { Token *tokenizer.Token Left Expression IsOptional bool Right Expression }
func (*VariableAccess) IsEqual ¶
func (s *VariableAccess) IsEqual(node Node) bool
func (*VariableAccess) Literal ¶
func (s *VariableAccess) Literal() string
func (*VariableAccess) String ¶
func (s *VariableAccess) String() string
func (*VariableAccess) Type ¶
func (s *VariableAccess) Type() string
type WrappedExpression ¶ added in v0.0.8
type WrappedExpression struct { Expr Expression RequiredIdents []string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.