Documentation ¶
Index ¶
Constants ¶
View Source
const ( LeftParen = "(" RightParen = ")" Colon = ":" And = "and" Or = "or" Not = "not" Identifier = "identifier" EOF = "eof" )
Variables ¶
View Source
var AttrHashKey = []byte("attribute value hashing")
Functions ¶
Types ¶
type Binary ¶
Binary is used for And, Or
func (Binary) Accept ¶
func (b Binary) Accept(visitor ExprVisitor)
type Expr ¶
type Expr interface {
Accept(ExprVisitor)
}
type ExprVisitor ¶
type ExprVisitor interface {
// contains filtered or unexported methods
}
type Grouping ¶
type Grouping struct {
Expr Expr
}
Grouping is used for LeftParen, RightParen
func (Grouping) Accept ¶
func (g Grouping) Accept(visitor ExprVisitor)
type Interpreter ¶
type Interpreter struct {
Literal
}
func (*Interpreter) Evaluate ¶
func (i *Interpreter) Evaluate(expr Expr) Literal
Source Files ¶
Click to show internal directories.
Click to hide internal directories.