Documentation ¶
Index ¶
- type Alt
- type AltRight
- type AndExpr
- type AndExprRight
- type Arith
- type ArithRight
- type Array
- type Bind
- type Comma
- type Compare
- type CompareRight
- type Expr
- type Factor
- type FactorRight
- type Filter
- type Foreach
- type Func
- type FuncDef
- type If
- type IfElif
- type Index
- type Iter
- type Label
- type Logic
- type LogicRight
- type Object
- type ObjectKeyVal
- type Operator
- type Pattern
- type PatternObject
- type Query
- type Reduce
- type Suffix
- type SuffixIndex
- type Term
- type Try
- type Unary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndExprRight ¶
AndExprRight ...
func (AndExprRight) String ¶
func (e AndExprRight) String() string
type CompareRight ¶
CompareRight ...
func (*CompareRight) String ¶
func (e *CompareRight) String() string
type Expr ¶
type Expr struct { Logic *Logic `( @@` If *If `| @@` Try *Try `| @@` Reduce *Reduce `| @@` Foreach *Foreach `| @@ )` UpdateOp Operator `( ( @UpdateOp | @UpdateAltOp )` Update *Alt ` @@` Bind *Bind `| @@ )?` Label *Label `| @@` }
Expr ...
type Foreach ¶
type Foreach struct { Term *Term `"foreach" @@` Pattern *Pattern `"as" @@` Start *Query `"(" @@` Update *Query `";" @@` Extract *Query `(";" @@)? ")"` }
Foreach ...
type FuncDef ¶
type FuncDef struct { Name string `"def" @Ident` Args []string `("(" @Ident (";" @Ident)* ")")? ":"` Body *Query `@@ ";"` }
FuncDef ...
type If ¶
type If struct { Cond *Query `"if" @@` Then *Query `"then" @@` Elif []IfElif `@@*` Else *Query `("else" @@)? "end"` }
If ...
type Index ¶
type Index struct { Name string `"." ( @Ident` Str string `| @String` Start *Query `| "[" ( @@` IsSlice bool `( @":"` End *Query `@@? )? | ":" @@ ) "]" )` }
Index ...
type ObjectKeyVal ¶
type ObjectKeyVal struct { Key string `( ( ( @Ident | @Keyword )` KeyString string ` | @String )` Query *Query `| "(" @@ ")" ) ":"` Val *Expr `@@` KeyOnly *string `| @Ident` KeyOnlyString string `| @String` }
ObjectKeyVal ...
func (*ObjectKeyVal) String ¶
func (e *ObjectKeyVal) String() string
type Operator ¶
type Operator int
Operator ...
const ( OpAdd Operator = iota OpSub OpMul OpDiv OpMod OpEq OpNe OpGt OpLt OpGe OpLe OpAnd OpOr OpAlt OpAssign OpModify OpUpdateAdd OpUpdateSub OpUpdateMul OpUpdateDiv OpUpdateMod OpUpdateAlt )
Operators ...
type Pattern ¶
type Pattern struct { Name string ` @Ident` Array []*Pattern `| "[" @@ ("," @@)* "]"` Object []PatternObject `| "{" @@ ("," @@)* "}"` }
Pattern ...
type PatternObject ¶
type PatternObject struct { Key string `( ( @Ident | @Keyword )` KeyString string ` | @String` Query *Query ` | "(" @@ ")" ) ":"` Val *Pattern `@@` KeyOnly string `| @Ident` }
PatternObject ...
func (*PatternObject) String ¶
func (e *PatternObject) String() string
type Reduce ¶
type Reduce struct { Term *Term `"reduce" @@` Pattern *Pattern `"as" @@` Start *Query `"(" @@` Update *Query `";" @@ ")"` }
Reduce ...
type Suffix ¶
type Suffix struct { Index *Index ` @@` SuffixIndex *SuffixIndex `| @@` Iter bool `| @("[" "]")` Optional bool `| @"?"` }
Suffix ...
type SuffixIndex ¶
type SuffixIndex struct { Start *Query `"[" ( @@` IsSlice bool `( @":"` End *Query `@@? )? | ":" @@ ) "]"` }
SuffixIndex ...
func (*SuffixIndex) String ¶
func (e *SuffixIndex) String() string
type Term ¶
type Term struct { Index *Index `( @@` Identity bool `| @"."` Recurse bool `| @".."` Func *Func `| @@` Object *Object `| @@` Array *Array `| @@` Number string `| @Number` Unary *Unary `| @@` Str string `| @String` RawStr string `| @" "` // never matches, used in compiler Null bool `| @"null"` True bool `| @"true"` False bool `| @"false"` Break string `| "break" @Ident` Query *Query `| "(" @@ ")" )` SuffixList []*Suffix `@@*` }
Term ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.