Documentation ¶
Index ¶
- func Add(lhs, rhs ast.Expression) *ast.BinaryExpression
- func And(lhs, rhs ast.Expression) *ast.LogicalExpression
- func Array(es ...ast.Expression) *ast.ArrayExpression
- func Bool(b bool) *ast.BooleanLiteral
- func Call(fn ast.Expression, args *ast.ObjectExpression) *ast.CallExpression
- func DefineTaskOption(o *ast.ObjectExpression) *ast.OptionStatement
- func DefineVariable(id string, e ast.Expression) *ast.VariableAssignment
- func Dictionary(key string, v ast.Expression) *ast.Property
- func Duration(m int64, u string) *ast.DurationLiteral
- func Equal(lhs, rhs ast.Expression) *ast.BinaryExpression
- func ExpressionStatement(e ast.Expression) *ast.ExpressionStatement
- func File(name string, imports []*ast.ImportDeclaration, body []ast.Statement) *ast.File
- func Float(f float64) *ast.FloatLiteral
- func FuncBlock(params []*ast.Property, stms ...ast.Statement) *ast.FunctionExpression
- func Function(params []*ast.Property, b ast.Expression) *ast.FunctionExpression
- func FunctionParams(args ...string) []*ast.Property
- func GreaterThan(lhs, rhs ast.Expression) *ast.BinaryExpression
- func Identifier(i string) *ast.Identifier
- func If(test, consequent, alternate ast.Expression) *ast.ConditionalExpression
- func ImportDeclaration(pkg string) *ast.ImportDeclaration
- func Imports(pkgs ...string) []*ast.ImportDeclaration
- func Integer(i int64) *ast.IntegerLiteral
- func LessThan(lhs, rhs ast.Expression) *ast.BinaryExpression
- func Member(p, c string) *ast.MemberExpression
- func Negative(e ast.Expression) *ast.UnaryExpression
- func Object(ps ...*ast.Property) *ast.ObjectExpression
- func ObjectWith(name string, ps ...*ast.Property) *ast.ObjectExpression
- func Or(lhs, rhs ast.Expression) *ast.LogicalExpression
- func Pipe(base ast.Expression, calls ...*ast.CallExpression) *ast.PipeExpression
- func Property(key string, e ast.Expression) *ast.Property
- func String(s string) *ast.StringLiteral
- func Subtract(lhs, rhs ast.Expression) *ast.BinaryExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(lhs, rhs ast.Expression) *ast.BinaryExpression
Add returns a addition *ast.BinaryExpression.
func And ¶
func And(lhs, rhs ast.Expression) *ast.LogicalExpression
And returns an and *ast.LogicalExpression.
func Array ¶
func Array(es ...ast.Expression) *ast.ArrayExpression
Array returns *ast.ArrayExpression with elements es.
func Call ¶
func Call(fn ast.Expression, args *ast.ObjectExpression) *ast.CallExpression
Call returns a *ast.CallExpression that is a function call of fn with args.
func DefineTaskOption ¶
func DefineTaskOption(o *ast.ObjectExpression) *ast.OptionStatement
DefineTaskOption returns an *ast.OptionStatement with the object provided. (e.g. option task = {...})
func DefineVariable ¶
func DefineVariable(id string, e ast.Expression) *ast.VariableAssignment
DefineVariable returns an *ast.VariableAssignment of id to the e. (e.g. id = <expression>)
func Dictionary ¶
func Dictionary(key string, v ast.Expression) *ast.Property
Dictionary returns an *ast.Property of string key to value expression.
func Duration ¶
func Duration(m int64, u string) *ast.DurationLiteral
Duration returns an *ast.DurationLiteral for a single duration.
func Equal ¶
func Equal(lhs, rhs ast.Expression) *ast.BinaryExpression
Equal returns an equal to *ast.BinaryExpression.
func ExpressionStatement ¶
func ExpressionStatement(e ast.Expression) *ast.ExpressionStatement
ExpressionStatement returns an *ast.ExpressionStatement of e.
func Function ¶
func Function(params []*ast.Property, b ast.Expression) *ast.FunctionExpression
Function returns an *ast.FunctionExpression with params with body b.
func FunctionParams ¶
FunctionParams returns a slice of *ast.Property for the parameters of a function.
func GreaterThan ¶
func GreaterThan(lhs, rhs ast.Expression) *ast.BinaryExpression
GreaterThan returns a greater than *ast.BinaryExpression.
func Identifier ¶
func Identifier(i string) *ast.Identifier
Identifier returns an *ast.Identifier of i.
func If ¶
func If(test, consequent, alternate ast.Expression) *ast.ConditionalExpression
If returns an *ast.ConditionalExpression
func ImportDeclaration ¶
func ImportDeclaration(pkg string) *ast.ImportDeclaration
ImportDeclaration returns an *ast.ImportDeclaration for pkg.
func Imports ¶
func Imports(pkgs ...string) []*ast.ImportDeclaration
Imports returns a []*ast.ImportDeclaration for each package in pkgs.
func Integer ¶
func Integer(i int64) *ast.IntegerLiteral
Integer returns an *ast.IntegerLiteral of i.
func LessThan ¶
func LessThan(lhs, rhs ast.Expression) *ast.BinaryExpression
LessThan returns a less than *ast.BinaryExpression.
func Member ¶
func Member(p, c string) *ast.MemberExpression
Member returns an *ast.MemberExpression where the key is p and the values is c.
func Negative ¶
func Negative(e ast.Expression) *ast.UnaryExpression
Negative returns *ast.UnaryExpression for -(e).
func Object ¶
func Object(ps ...*ast.Property) *ast.ObjectExpression
Object returns an *ast.ObjectExpression with properties ps.
func ObjectWith ¶
func ObjectWith(name string, ps ...*ast.Property) *ast.ObjectExpression
ObjectWith adds many properties to an existing named identifier.
func Or ¶
func Or(lhs, rhs ast.Expression) *ast.LogicalExpression
Or returns an or *ast.LogicalExpression.
func Pipe ¶
func Pipe(base ast.Expression, calls ...*ast.CallExpression) *ast.PipeExpression
Pipe returns a *ast.PipeExpression that is a piped sequence of call expressions starting at base. It requires at least one call expression and will panic otherwise.
func Property ¶
func Property(key string, e ast.Expression) *ast.Property
Property returns an *ast.Property of key to e. (e.g. key: <expression>)
func Subtract ¶
func Subtract(lhs, rhs ast.Expression) *ast.BinaryExpression
Subtract returns a subtraction *ast.BinaryExpression.
Types ¶
This section is empty.