ast

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expression

type Expression struct {
	PExpr *PrimaryExpr
}

func (*Expression) Dump

func (ast *Expression) Dump(indent int)

func (*Expression) Exec

func (ast *Expression) Exec(ctx *exec.Context) (bool, interface{}, error)

type ExpressionList

type ExpressionList struct {
	Expressions []*Expression
}

func (*ExpressionList) Dump

func (ast *ExpressionList) Dump(indent int)

func (*ExpressionList) Exec

func (ast *ExpressionList) Exec(ctx *exec.Context) (bool, interface{}, error)

type IString

type IString struct {
	Str   string
	Expr  *Expression
	Ident *Identifier
	Next  *IString
}

func (*IString) Dump

func (ast *IString) Dump(indent int)

func (*IString) Exec

func (ast *IString) Exec(ctx *exec.Context) (bool, string, error)

type Identifier added in v0.0.6

type Identifier struct {
	Name string
}

func (*Identifier) Dump added in v0.0.6

func (ast *Identifier) Dump(indent int)

func (*Identifier) Exec added in v0.0.6

func (ast *Identifier) Exec(ctx *exec.Context) (bool, interface{}, error)

type IndexExpr

type IndexExpr struct {
	Operand *PrimaryExpr
	Index   *PrimaryExpr
}

func (*IndexExpr) Dump

func (ast *IndexExpr) Dump(indent int)

func (*IndexExpr) Exec

func (ast *IndexExpr) Exec(ctx *exec.Context) (bool, interface{}, error)

type Literal

type Literal struct {
	Type token.Token
	Str  string
	Int  int64
}

func (*Literal) Dump

func (ast *Literal) Dump(indent int)

func (*Literal) Exec

func (ast *Literal) Exec(ctx *exec.Context) (bool, interface{}, error)

type Operation

type Operation struct {
	Subjects  *ExpressionList
	Negate    bool
	Operation string
	Arguments *ExpressionList
}

func (*Operation) Dump

func (ast *Operation) Dump(indent int)

func (*Operation) Exec

func (ast *Operation) Exec(ctx *exec.Context) (bool, interface{}, error)

type PrimaryExpr

type PrimaryExpr struct {
	Literal *Literal
	Ident   *Identifier

	Selector *SelectorExpr

	Index *IndexExpr
}

func (*PrimaryExpr) Dump

func (ast *PrimaryExpr) Dump(indent int)

func (*PrimaryExpr) Exec

func (ast *PrimaryExpr) Exec(ctx *exec.Context) (bool, interface{}, error)

type SelectorExpr

type SelectorExpr struct {
	Operand *PrimaryExpr
	Ident   string
}

func (*SelectorExpr) Dump

func (ast *SelectorExpr) Dump(indent int)

func (*SelectorExpr) Exec

func (ast *SelectorExpr) Exec(ctx *exec.Context) (bool, interface{}, error)

type Statement

type Statement struct {
	Operation *Operation
	Message   *IString
}

func (*Statement) Dump

func (ast *Statement) Dump(indent int)

func (*Statement) Exec

func (ast *Statement) Exec(ctx *exec.Context) (bool, interface{}, string, error)

Jump to

Keyboard shortcuts

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