Documentation ¶
Index ¶
- type AERC
- type AmberControl
- type And
- type ArtifactControl
- type BooleanOperator
- type Constraint
- type CreatureControl
- type Disruption
- type Efficiency
- type Expansion
- type ExpectedAmber
- type ExprChain
- type Expression
- type House
- type Node
- type Op
- type OpRight
- type Or
- type SAS
- type Statement
- type Value
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmberControl ¶
type AmberControl struct {
Value string `@"a"`
}
AmberControl represents the amber control variable type.
func (AmberControl) String ¶
func (a AmberControl) String() string
type And ¶
type And struct {
Value string `@"," | @"+"`
}
And represents the "and" operator between two expressions.
type ArtifactControl ¶
type ArtifactControl struct {
Value string `@"r"`
}
ArtifactControl represents the artifact control variable type.
func (ArtifactControl) String ¶
func (a ArtifactControl) String() string
type BooleanOperator ¶
BooleanOperator represents the operator that combines two expressions. Currently can be "and" or "or".
type Constraint ¶
Constraint represents a single constraint.
func (*Constraint) String ¶
func (c *Constraint) String() string
type CreatureControl ¶
type CreatureControl struct {
Value string `@"c"`
}
CreatureControl represents the creature control variable type.
func (CreatureControl) String ¶
func (c CreatureControl) String() string
type Disruption ¶
type Disruption struct {
Value string `@"d"`
}
Disruption represents the disruption variable type.
func (Disruption) String ¶
func (e Disruption) String() string
type Efficiency ¶
type Efficiency struct {
Value string `@"f"`
}
Efficiency represents the efficiency variable type.
func (Efficiency) String ¶
func (e Efficiency) String() string
type Expansion ¶
type Expansion struct {
Value string `@"expansion" | @"set"`
}
Expansion represents the expansion (or set) variable type.
type ExpectedAmber ¶
type ExpectedAmber struct {
Value string `@"e"`
}
ExpectedAmber represents the expected amber variable type.
func (ExpectedAmber) String ¶
func (a ExpectedAmber) String() string
type ExprChain ¶
type ExprChain struct { Left *Expression `@@` OpRight []*OpRight `@@*` }
ExprChain represents a full statement, which consists of at least one expression followed by zero or more other expressions combined with boolean operators.
type Expression ¶
type Expression struct { Constraint *Constraint `@@` Substatement *Statement `| "(" @@ ")"` }
Expression is either a single constraint or a parenthetical statement.
func (*Expression) MakeTree ¶
func (e *Expression) MakeTree() *Node
MakeTree builds up a filter tree for the expression.
func (*Expression) String ¶
func (e *Expression) String() string
type House ¶
type House struct {
Value string `@"house"`
}
House represents the house variable type.
type Node ¶
type Node struct { Op BooleanOperator Left *Node Right *Node Constraint *Constraint }
Node represents a node in the filter tree. It can either have a non-nil constraint (making it a leaf in the filter tree), or left and a right non-nil nodes combined with a boolean operator.
type Op ¶
type Op struct {
Equal bool `@"="?`
}
Op represent the operation specified by a constraint. Currently can only be equals.
type OpRight ¶
type OpRight struct { Op BooleanOperator `@@` Right *Statement `@@` }
OpRight represents the right side of an statement, including the operator.
type Or ¶
type Or struct {
Value string `@"^"`
}
Or represents the "or" operator between two expressions.
type Statement ¶
type Statement struct {
Expr *ExprChain `@@`
}
Statement represents a statement specifying a full filter rule.
type Value ¶
type Value struct { Range []string `@(Float|Int)* @":" @(Float|Int)*` Float *float64 `| @Float` Int *int `| @Int` String *string `| @Ident` }
Value represents the value of a constraint. Currently could be a range, float, int, or string.