ast

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOOP = Op(0)
	OR   = Op(1)
	AND  = Op(2)
)

Variables

View Source
var (
	TRUE  = val(true)
	FALSE = val(false)
)

Functions

This section is empty.

Types

type Attrib

type Attrib interface{}

type BoolExpr

type BoolExpr struct {
	A  Val
	B  Val
	Op Op
}

func NewBoolAndExpr

func NewBoolAndExpr(a, b Attrib) (*BoolExpr, error)

func NewBoolGroupExpr

func NewBoolGroupExpr(a Attrib) (*BoolExpr, error)

func NewBoolOrExpr

func NewBoolOrExpr(a, b Attrib) (*BoolExpr, error)

func (*BoolExpr) Eval

func (this *BoolExpr) Eval() bool

func (*BoolExpr) String

func (this *BoolExpr) String() string

type LessThanExpr

type LessThanExpr struct {
	A int64
	B int64
}

func NewLessThanExpr

func NewLessThanExpr(a, b Attrib) (*LessThanExpr, error)

func (*LessThanExpr) Eval

func (this *LessThanExpr) Eval() bool

func (*LessThanExpr) String

func (this *LessThanExpr) String() string

type Op

type Op int

func (Op) String

func (o Op) String() string

type SubStringExpr

type SubStringExpr struct {
	A string
	B string
}

func NewSubStringExpr

func NewSubStringExpr(a, b Attrib) (*SubStringExpr, error)

func (*SubStringExpr) Eval

func (this *SubStringExpr) Eval() bool

func (*SubStringExpr) String

func (this *SubStringExpr) String() string

type Val

type Val interface {
	Attrib
	Eval() bool
	String() string
}

Jump to

Keyboard shortcuts

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