Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndExpr ¶ added in v0.1.0
type AndExpr struct { Left *Compare `@@` Right []struct { Op Operator `@"and"` Right *Compare `@@` } `@@*` }
AndExpr ...
type Arith ¶ added in v0.1.0
type Arith struct { Left *Factor `( @@` Right []struct { Op Operator `@("+" | "-")` Right *Factor `@@` } `@@* )` }
Arith ...
type ArrayIndex ¶
type ArrayIndex struct { Index *Pipe `"." "[" ( @@` IsSlice bool `( @":"` End *Pipe `@@? )? | ":" @@ ) "]"` }
ArrayIndex ...
type Compare ¶ added in v0.1.0
type Compare struct { Left *Arith `@@` Right *struct { Op Operator `@CompareOp` Right *Arith `@@` } `@@?` }
Compare ...
type Factor ¶ added in v0.1.0
type Factor struct { Left *Term `@@` Right []struct { Op Operator `@("*" | "/" | "%")` Right *Term `@@` } `@@*` }
Factor ...
type FuncDef ¶ added in v0.1.0
type FuncDef struct { Name string `"def" @Ident` Args []string `("(" @Ident (";" @Ident)* ")")? ":"` Body *Query `@@ ";"` }
FuncDef ...
type If ¶ added in v0.1.0
type If struct { Cond *Pipe `"if" @@` Then *Pipe `"then" @@` Elif []struct { Cond *Pipe `"elif" @@` Then *Pipe `"then" @@` } `@@*` Else *Pipe `("else" @@)? "end"` }
If ...
type Logic ¶ added in v0.1.0
type Logic struct { Left *AndExpr `@@` Right []struct { Op Operator `@"or"` Right *AndExpr `@@` } `@@*` }
Logic ...
type Object ¶
type Object struct { KeyVals []struct { Key string `( ( ( @Ident | @String )` Pipe *Pipe `| "(" @@ ")" ) ":"` Val *Expr `@@` KeyOnly *string `| ( @Ident | @String ) )` } `"{" (@@ ("," @@)*)? "}"` }
Object ...
type ObjectIndex ¶
type ObjectIndex struct {
Name string `"." ( @Ident | "[" @String "]" )`
}
ObjectIndex ...
type Operator ¶ added in v0.1.0
type Operator int
Operator ...
Operators ...
type Suffix ¶
type Suffix struct { ObjectIndex *ObjectIndex ` @@` ArrayIndex *ArrayIndex `| @@` Array *Array `| @@` Optional bool `| @"?"` }
Suffix ...
type Term ¶
type Term struct { ObjectIndex *ObjectIndex `( @@` ArrayIndex *ArrayIndex `| @@` Identity bool `| @"."` Recurse bool `| @".."` Func *Func `| @@` Object *Object `| @@` Array *Array `| @@` Number *float64 `| @Number` Unary *struct { Op Operator `@("+" | "-")` Term *Term `@@` } `| @@` String *string `| @String` Pipe *Pipe `| "(" @@ ")" )` SuffixList []*Suffix `@@*` }
Term ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.