bobzhang/moonjq/ast does not have a README file
pub(all) suberror InterpreterError {
TypeMismatch(String, String)
KeyNotFound(String)
IndexOutOfBounds(Int)
InvalidOperation(String)
DivisionByZero
TypeError(String)
EvalError(String)
}impl Eq for InterpreterErrorimpl Show for InterpreterErrorpub(all) enum BinaryOp {
Add
Subtract
Multiply
Divide
Modulo
Equal
NotEqual
LessThan
LessEq
GreaterThan
GreaterEq
And
Or
}pub(all) enum Expr {
Identity
Literal(Literal)
Pipe(Expr, Expr)
Comma(Expr, Expr)
Key(String)
Index(Array[Int])
Slice(Int?, Int?)
Optional(Expr)
ArrayConstruct(Expr?)
ObjectConstruct(Array[(Expr, Expr?)])
Operation(Expr, BinaryOp, Expr)
Length
Keys
Values
Type
Empty
Not
Map(Expr)
Select(Expr)
Sort
SortBy(Expr)
Reverse
Flatten(Int?)
Unique
UniqueBy(Expr)
GroupBy(Expr)
Combinations
Transpose
Add
Floor
Sqrt
Min
MinBy(Expr)
Max
MaxBy(Expr)
Round
Ceil
Abs
Split(String)
Join(String)
StartsWith(String)
EndsWith(String)
Contains(Expr)
Inside(Expr)
Has(String)
In(Expr)
ToEntries
FromEntries
WithEntries(Expr)
MapValues(Expr)
Range(Int)
RangeFromTo(Expr, Expr)
RangeWithStep(Expr, Expr, Expr)
First
FirstGen(Expr)
Last
LastGen(Expr)
Repeat(Expr)
IndicesOf(Expr)
IndexOf(Expr)
Any
AnyGen(Expr, Expr)
All
AllGen(Expr, Expr)
IfThenElse(Expr, Expr, Expr)
TryCatch(Expr, Expr?)
Variable(String)
As(Expr, String, Expr)
Reduce(Expr, String, Expr, Expr)
Foreach(Expr, String, Expr, Expr, Expr?)
Recurse
RecurseWith(Expr, Expr)
Walk(Expr)
Path(Expr)
Update(Expr, Expr)
Assign(Expr, Expr)
Alternative(Expr, Expr)
AddAssign(Expr, Expr)
SubAssign(Expr, Expr)
MulAssign(Expr, Expr)
DivAssign(Expr, Expr)
ModAssign(Expr, Expr)
AltAssign(Expr, Expr)
Format(String)
StringInterpolation(Array[(String, Expr?)])
FunctionDef(String, Array[String], Expr)
FunctionCall(String, Array[Expr])
LTrimStr(String)
RTrimStr(String)
AsciiUpcase
AsciiDowncase
Explode
Implode
ToJsonString
FromJsonString
Nth(Int)
RIndex(Expr)
Paths
PathsWithFilter(Expr)
LeafPaths
GetPath(Expr)
SetPath(Expr, Expr)
DelPaths(Expr)
Limit(Int, Expr)
Until(Expr, Expr)
While(Expr, Expr)
Pow(Expr)
Log
Exp
Sin
Cos
Tan
Asin
Acos
Atan
Test(String)
Match(String)
Capture(String)
Scan(String)
Splits(String)
Sub(String, String)
GSub(String, String)
}pub(all) enum Literal {
Null
Bool(Bool)
Number(Double)
String(String)
}A jq implementation in MoonBit