ast

package
v0.0.0-...-eee4cb4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AST

type AST struct {
	Expr *Expr `json:"expr,omitempty"`
}

type BinaryOperator

type BinaryOperator struct {
	LHS *Expr `json:"lhs,omitempty"`
	RHS *Expr `json:"rhs,omitempty"`
	// oneof
	LogAnd    *OpLogAnd    `json:"and,omitempty"`
	LogOr     *OpLogOr     `json:"or,omitempty"`
	NumAdd    *OpNumAdd    `json:"add,omitempty"`
	NumSub    *OpNumSub    `json:"sub,omitempty"`
	NumDiv    *OpNumDiv    `json:"div,omitempty"`
	NumMul    *OpNumMul    `json:"mul,omitempty"`
	CmpEq     *OpCmpEq     `json:"eq,omitempty"`
	CmpNotEq  *OpCmpNotEq  `json:"not_eq,omitempty"`
	CmpGt     *OpCmpGt     `json:"gt,omitempty"`
	CmpGtOrEq *OpCmpGtOrEq `json:"gte,omitempty"`
	CmpLs     *OpCmpLs     `json:"ls,omitempty"`
	CmpLsOrEq *OpCmpLsOrEq `json:"lse,omitempty"`
}

type Expr

type Expr struct {
	// oneof
	Literal        *Literal        `json:"literal,omitempty"`
	Selector       *Selector       `json:"selector,omitempty"`
	UnaryOperator  *UnaryOperator  `json:"unary_operator,omitempty"`
	BinaryOperator *BinaryOperator `json:"binary_operator,omitempty"`
	FuncCall       *FuncCall       `json:"func_call,omitempty"`
	Next           *Expr           `json:"next,omitempty"`
}

type FuncCall

type FuncCall struct {
	Name string  `json:"name,omitempty"`
	Args []*Expr `json:"args,omitempty"`
}

type Literal

type Literal struct {
	// oneof
	Bool   *bool     `json:"bool,omitempty"`
	String *string   `json:"string,omitempty"`
	Int    *int64    `json:"int64,omitempty"`
	Float  *float64  `json:"float64,omitempty"`
	Null   *struct{} `json:"null,omitempty"`
}

type MemberSelector

type MemberSelector struct {
	Index *Expr     `json:"index,omitempty"`
	Child *Selector `json:"child,omitempty"`
}

type NoopSelector

type NoopSelector struct{}

type OpCmpEq

type OpCmpEq struct{}

type OpCmpGt

type OpCmpGt struct{}

type OpCmpGtOrEq

type OpCmpGtOrEq struct{}

type OpCmpLs

type OpCmpLs struct{}

type OpCmpLsOrEq

type OpCmpLsOrEq struct{}

type OpCmpNotEq

type OpCmpNotEq struct{}

type OpLogAnd

type OpLogAnd struct{}

type OpLogNot

type OpLogNot struct{}

type OpLogOr

type OpLogOr struct{}

type OpNumAdd

type OpNumAdd struct{}

type OpNumDiv

type OpNumDiv struct{}

type OpNumMul

type OpNumMul struct{}

type OpNumSub

type OpNumSub struct{}

type Selector

type Selector struct {
	// oneof
	Noop   *NoopSelector   `json:"noop,omitempty"`
	Member *MemberSelector `json:"member,omitempty"`
	Slice  *SliceSelector  `json:"slice,omitempty"`
}

type SliceSelector

type SliceSelector struct {
	From  *Expr     `json:"from,omitempty"`
	To    *Expr     `json:"to,omitempty"`
	Child *Selector `json:"child,omitempty"`
}

type UnaryOperator

type UnaryOperator struct {
	Arg *Expr `json:"arg,omitempty"`
	// oneof
	LogNot *OpLogNot `json:"not,omitempty"`
}

Jump to

Keyboard shortcuts

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