Versions in this module Expand all Collapse all v0 v0.2.4 Jul 9, 2021 v0.2.3 Aug 21, 2020 v0.2.2 Aug 21, 2020 Changes in this version + const Boolean + const Duration + const Number + const String + const Time + const Unknown + func Evaluate(expr Expr, args map[string]interface{}) (bool, error) + func FormatDuration(d time.Duration) string + func Quote(s string) string + func QuoteIdent(s string) string + func SetDefaultEpsilon(ep float64) + func Variables(expression Expr) []string + func Walk(v Visitor, node Node) + func WalkFunc(node Node, fn func(Node)) + type BinaryExpr struct + LHS Expr + Op Token + RHS Expr + func (e *BinaryExpr) Args() []string + func (e *BinaryExpr) String() string + type BooleanLiteral struct + Val bool + func (l *BooleanLiteral) Args() []string + func (l *BooleanLiteral) String() string + type DataType string + func InspectDataType(v interface{}) DataType + type DurationLiteral struct + Val time.Duration + func (l *DurationLiteral) String() string + type Expr interface + Args func() []string + type Node interface + String func() string + type NumberLiteral struct + Val float64 + func (l *NumberLiteral) String() string + func (n *NumberLiteral) Args() []string + type ParenExpr struct + Expr Expr + func (e *ParenExpr) String() string + func (p *ParenExpr) Args() []string + type Parser struct + func NewParser(r io.Reader) *Parser + func (p *Parser) Parse() (Expr, error) + type SliceNumberLiteral struct + Val []float64 + func (l *SliceNumberLiteral) Args() []string + func (l *SliceNumberLiteral) String() string + type SliceStringLiteral struct + Val []string + func NewSliceStringLiteral(val []string) *SliceStringLiteral + func (l *SliceStringLiteral) Args() []string + func (l *SliceStringLiteral) String() string + type StringLiteral struct + Val string + func (l *StringLiteral) Args() []string + func (l *StringLiteral) String() string + type TimeLiteral struct + Val time.Time + func (l *TimeLiteral) String() string + type Token int + const AND + const ARRAY + const CONTAINS + const EOF + const EQ + const EREG + const FALSE + const GT + const GTE + const IDENT + const ILLEGAL + const IN + const LPAREN + const LT + const LTE + const NAND + const NEQ + const NEREG + const NOTCONTAINS + const NOTIN + const NUMBER + const OR + const RPAREN + const STRING + const TRUE + const XOR + func (tok Token) Precedence() int + func (tok Token) String() string + type VarRef struct + Val string + func (r *VarRef) Args() []string + func (r *VarRef) String() string + type Visitor interface + Visit func(Node) Visitor