Documentation
¶
Index ¶
- func AsType[T Expr](e Expr) (T, bool)
- func IsType[T Expr](e Expr) bool
- func LastAsType[T Expr](e Expr) (T, bool)
- type ArrayExpr
- type AssignExpr
- type BinaryExpr
- type BoolExpr
- type BranchExpr
- type CallExpr
- type ChainedExpr
- type ConditionalExpr
- type EachExpr
- type Expr
- type Expressions
- type FilterExpr
- type GroupExpr
- type IndexExpr
- type KeyValue
- type MapExpr
- type NullExpr
- type NumberFloatExpr
- type NumberIntExpr
- type ObjectExpr
- type Program
- type PropertyExpr
- type RangeExpr
- type RecursiveDescentExpr
- type RegexExpr
- type SearchExpr
- type SortByExpr
- type SpreadExpr
- type Statement
- type StringExpr
- type UnaryExpr
- type VariableExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastAsType ¶
Types ¶
type ArrayExpr ¶
type ArrayExpr struct {
Exprs Expressions
}
type AssignExpr ¶
type AssignExpr struct {
Variable VariableExpr
Value Expr
}
type BranchExpr ¶
type BranchExpr struct {
Exprs []Expr
}
type CallExpr ¶
type CallExpr struct {
Function string
Args Expressions
}
type ChainedExpr ¶
type ChainedExpr struct {
Exprs Expressions
}
type ConditionalExpr ¶
type Expr ¶
type Expr interface {
// contains filtered or unexported methods
}
func BranchExprs ¶
func ChainExprs ¶
func RemoveLast ¶
type Expressions ¶
type Expressions []Expr
type FilterExpr ¶
type FilterExpr struct {
Expr Expr
}
type NumberFloatExpr ¶
type NumberFloatExpr struct {
Value float64
}
type NumberIntExpr ¶
type NumberIntExpr struct {
Value int64
}
type ObjectExpr ¶
type ObjectExpr struct {
Pairs []KeyValue
}
type PropertyExpr ¶
type PropertyExpr struct {
// Property can resolve to a string or number.
// If it resolves to a number, we expect to be reading from an array.
// If it resolves to a string, we expect to be reading from a map.
Property Expr
}
type RecursiveDescentExpr ¶
type SearchExpr ¶
type SearchExpr struct {
Expr Expr
}
type SortByExpr ¶
type SpreadExpr ¶
type SpreadExpr struct{}
type StringExpr ¶
type StringExpr struct {
Value string
}
type VariableExpr ¶
type VariableExpr struct {
Name string
}
Click to show internal directories.
Click to hide internal directories.