xpr

package
v0.0.0-...-309cb8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2019 License: AGPL-3.0 Imports: 3 Imported by: 2

Documentation

Overview

Copyright 2017 karma.run AG. All rights reserved. Use of this source code is governed by an AGPL license that can be found in the LICENSE file.

Copyright 2017 karma.run AG. All rights reserved. Use of this source code is governed by an AGPL license that can be found in the LICENSE file.

Copyright 2017 karma.run AG. All rights reserved. Use of this source code is governed by an AGPL license that can be found in the LICENSE file.

Copyright 2017 karma.run AG. All rights reserved. Use of this source code is governed by an AGPL license that can be found in the LICENSE file.

Copyright 2017 karma.run AG. All rights reserved. Use of this source code is governed by an AGPL license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

View Source
var LanguageModel = mdl.DefineRecursion("function", func(function *mdl.Recursion) mdl.Model {

	expression := mdl.DefineRecursion("expression", func(expression *mdl.Recursion) mdl.Model {

		data := mdl.DefineRecursion("data", func(data *mdl.Recursion) mdl.Model {
			return mdl.UnionFromMap(map[string]mdl.Model{

				"null":     mdl.Null{},
				"bool":     mdl.Bool{},
				"dateTime": mdl.DateTime{},
				"string":   mdl.String{},
				"float":    mdl.Float{},
				"int8":     mdl.Int8{},
				"int16":    mdl.Int16{},
				"int32":    mdl.Int32{},
				"int64":    mdl.Int64{},
				"uint8":    mdl.Uint8{},
				"uint16":   mdl.Uint16{},
				"uint32":   mdl.Uint32{},
				"uint64":   mdl.Uint64{},
				"symbol":   mdl.String{},

				"map":    mdl.Map{data},
				"list":   mdl.List{data},
				"set":    mdl.Set{data},
				"struct": mdl.Map{data},
				"tuple":  mdl.List{data},
				"union":  mdl.Tuple{mdl.String{}, data},
				"ref":    mdl.Tuple{mdl.String{}, mdl.String{}},
				"expr":   expression,
			})
		})

		return mdl.UnionFromMap(map[string]mdl.Model{

			"null":     mdl.Null{},
			"bool":     mdl.Bool{},
			"dateTime": mdl.DateTime{},
			"string":   mdl.String{},
			"float":    mdl.Float{},
			"int8":     mdl.Int8{},
			"int16":    mdl.Int16{},
			"int32":    mdl.Int32{},
			"int64":    mdl.Int64{},
			"uint8":    mdl.Uint8{},
			"uint16":   mdl.Uint16{},
			"uint32":   mdl.Uint32{},
			"uint64":   mdl.Uint64{},
			"symbol":   mdl.String{},

			"data":      data,
			"signature": function,

			"define": mdl.Tuple{mdl.String{}, expression},
			"scope":  mdl.String{},

			"dateTimeNow":    mdl.EmptyStruct,
			"currentUser":    mdl.EmptyStruct,
			"all":            expression,
			"assertPresent":  expression,
			"delete":         expression,
			"extractStrings": expression,
			"first":          expression,
			"get":            expression,
			"isPresent":      expression,
			"length":         expression,
			"metarialize":    expression,
			"model":          expression,
			"modelOf":        expression,
			"not":            expression,
			"presentOrZero":  expression,
			"refTo":          expression,
			"resolveAllRefs": expression,
			"reverseList":    expression,
			"stringToLower":  expression,
			"tag":            expression,
			"allReferrers":   expression,
			"tagExists":      expression,
			"zero":           mdl.EmptyStruct,

			"stringContains":  mdl.Tuple{expression, expression},
			"substringIndex":  mdl.Tuple{expression, expression},
			"memSortFunction": mdl.Tuple{expression, function},

			"leftFoldList":  mdl.Tuple{expression, expression, function},
			"rightFoldList": mdl.Tuple{expression, expression, function},

			"toFloat":  expression,
			"toInt8":   expression,
			"toInt16":  expression,
			"toInt32":  expression,
			"toInt64":  expression,
			"toUint8":  expression,
			"toUint16": expression,
			"toUint32": expression,
			"toUint64": expression,

			"addFloat":  mdl.Tuple{expression, expression},
			"addInt64":  mdl.Tuple{expression, expression},
			"addInt32":  mdl.Tuple{expression, expression},
			"addInt16":  mdl.Tuple{expression, expression},
			"addInt8":   mdl.Tuple{expression, expression},
			"addUint64": mdl.Tuple{expression, expression},
			"addUint32": mdl.Tuple{expression, expression},
			"addUint16": mdl.Tuple{expression, expression},
			"addUint8":  mdl.Tuple{expression, expression},

			"subFloat":  mdl.Tuple{expression, expression},
			"subInt64":  mdl.Tuple{expression, expression},
			"subInt32":  mdl.Tuple{expression, expression},
			"subInt16":  mdl.Tuple{expression, expression},
			"subInt8":   mdl.Tuple{expression, expression},
			"subUint64": mdl.Tuple{expression, expression},
			"subUint32": mdl.Tuple{expression, expression},
			"subUint16": mdl.Tuple{expression, expression},
			"subUint8":  mdl.Tuple{expression, expression},

			"divFloat":  mdl.Tuple{expression, expression},
			"divInt64":  mdl.Tuple{expression, expression},
			"divInt32":  mdl.Tuple{expression, expression},
			"divInt16":  mdl.Tuple{expression, expression},
			"divInt8":   mdl.Tuple{expression, expression},
			"divUint64": mdl.Tuple{expression, expression},
			"divUint32": mdl.Tuple{expression, expression},
			"divUint16": mdl.Tuple{expression, expression},
			"divUint8":  mdl.Tuple{expression, expression},

			"mulFloat":  mdl.Tuple{expression, expression},
			"mulInt64":  mdl.Tuple{expression, expression},
			"mulInt32":  mdl.Tuple{expression, expression},
			"mulInt16":  mdl.Tuple{expression, expression},
			"mulInt8":   mdl.Tuple{expression, expression},
			"mulUint64": mdl.Tuple{expression, expression},
			"mulUint32": mdl.Tuple{expression, expression},
			"mulUint16": mdl.Tuple{expression, expression},
			"mulUint8":  mdl.Tuple{expression, expression},

			"gtFloat":  mdl.Tuple{expression, expression},
			"gtInt64":  mdl.Tuple{expression, expression},
			"gtInt32":  mdl.Tuple{expression, expression},
			"gtInt16":  mdl.Tuple{expression, expression},
			"gtInt8":   mdl.Tuple{expression, expression},
			"gtUint64": mdl.Tuple{expression, expression},
			"gtUint32": mdl.Tuple{expression, expression},
			"gtUint16": mdl.Tuple{expression, expression},
			"gtUint8":  mdl.Tuple{expression, expression},

			"ltFloat":  mdl.Tuple{expression, expression},
			"ltInt64":  mdl.Tuple{expression, expression},
			"ltInt32":  mdl.Tuple{expression, expression},
			"ltInt16":  mdl.Tuple{expression, expression},
			"ltInt8":   mdl.Tuple{expression, expression},
			"ltUint64": mdl.Tuple{expression, expression},
			"ltUint32": mdl.Tuple{expression, expression},
			"ltUint16": mdl.Tuple{expression, expression},
			"ltUint8":  mdl.Tuple{expression, expression},

			"after":       mdl.Tuple{expression, expression},
			"before":      mdl.Tuple{expression, expression},
			"concatLists": mdl.Tuple{expression, expression},
			"equal":       mdl.Tuple{expression, expression},
			"field":       mdl.Tuple{mdl.String{}, expression},
			"key":         mdl.Tuple{expression, expression},

			"with":    mdl.Tuple{expression, function},
			"mapSet":  mdl.Tuple{expression, function},
			"mapList": mdl.Tuple{expression, function},
			"mapMap":  mdl.Tuple{expression, function},
			"mapEnum": mdl.StructFromMap(map[string]mdl.Model{
				"symbol":  expression,
				"default": mdl.Optional{mdl.String{}},
				"mapping": mdl.Map{mdl.String{}},
			}),

			"and": mdl.List{expression},
			"or":  mdl.List{expression},

			"create":     mdl.Tuple{expression, function},
			"filterList": mdl.Tuple{expression, function},
			"memSort":    mdl.Tuple{expression, function},

			"createMultiple": mdl.Tuple{expression, mdl.Map{function}},
			"resolveRefs":    mdl.Tuple{expression, mdl.Set{expression}},

			"indexTuple": mdl.Tuple{expression, mdl.Int64{}},

			"switchCase": mdl.Tuple{expression, mdl.Map{function}},

			"reduceList": mdl.StructFromMap(map[string]mdl.Model{
				"value":   expression,
				"initial": expression,
				"reducer": function,
			}),

			"setField": mdl.StructFromMap(map[string]mdl.Model{
				"name":  mdl.String{},
				"value": expression,
				"in":    expression,
			}),
			"setKey": mdl.StructFromMap(map[string]mdl.Model{
				"name":  mdl.String{},
				"value": expression,
				"in":    expression,
			}),
			"relocateRef": mdl.StructFromMap(map[string]mdl.Model{
				"ref":   expression,
				"model": expression,
			}),
			"referrers": mdl.StructFromMap(map[string]mdl.Model{
				"of": expression,
				"in": expression,
			}),
			"referred": mdl.StructFromMap(map[string]mdl.Model{
				"from": expression,
				"in":   expression,
			}),
			"inList": mdl.StructFromMap(map[string]mdl.Model{
				"value": expression,
				"in":    expression,
			}),
			"matchRegex": mdl.StructFromMap(map[string]mdl.Model{
				"value":           expression,
				"regex":           mdl.String{},
				"caseInsensitive": mdl.Bool{},
				"multiLine":       mdl.Bool{},
			}),
			"searchRegex": mdl.StructFromMap(map[string]mdl.Model{
				"value":           expression,
				"regex":           mdl.String{},
				"caseInsensitive": mdl.Bool{},
				"multiLine":       mdl.Bool{},
			}),
			"searchAllRegex": mdl.StructFromMap(map[string]mdl.Model{
				"value":           expression,
				"regex":           mdl.String{},
				"caseInsensitive": mdl.Bool{},
				"multiLine":       mdl.Bool{},
			}),
			"slice": mdl.StructFromMap(map[string]mdl.Model{
				"value":  expression,
				"offset": expression,
				"length": expression,
			}),
			"graphFlow": mdl.StructFromMap(map[string]mdl.Model{
				"start": expression,
				"flow": mdl.Set{mdl.StructFromMap(map[string]mdl.Model{
					"from":     expression,
					"forward":  mdl.Set{expression},
					"backward": mdl.Set{expression},
				})},
			}),
			"assertModelRef": mdl.StructFromMap(map[string]mdl.Model{
				"value": expression,
				"ref":   expression,
			}),

			"switchModelRef": mdl.StructFromMap(map[string]mdl.Model{
				"value":   expression,
				"default": expression,
				"cases": mdl.Set{mdl.StructFromMap(map[string]mdl.Model{
					"match":  expression,
					"return": function,
				})},
			}),

			"if": mdl.StructFromMap(map[string]mdl.Model{
				"condition": expression,
				"then":      expression,
				"else":      expression,
			}),

			"assertCase": mdl.StructFromMap(map[string]mdl.Model{
				"case":  mdl.String{},
				"value": expression,
			}),
			"isCase": mdl.StructFromMap(map[string]mdl.Model{
				"value": expression,
				"case":  expression,
			}),

			"update": mdl.StructFromMap(map[string]mdl.Model{
				"ref":   expression,
				"value": expression,
			}),

			"joinStrings": mdl.StructFromMap(map[string]mdl.Model{
				"strings":   expression,
				"separator": expression,
			}),
		})
	})

	arguments := mdl.List{mdl.String{}}

	return mdl.UnionFromMap(map[string]mdl.Model{
		"function": mdl.Tuple{arguments, mdl.List{expression}},
	})
})

Functions

func DataValueFromExpression

func DataValueFromExpression(x Expression) val.Value

func ValueFromExpression

func ValueFromExpression(x Expression) val.Value

func ValueFromFunction

func ValueFromFunction(f Function) val.Value

Types

type AddFloat

type AddFloat [2]Expression

func (AddFloat) Transform

func (x AddFloat) Transform(f func(Expression) Expression) Expression

type AddInt16

type AddInt16 [2]Expression

func (AddInt16) Transform

func (x AddInt16) Transform(f func(Expression) Expression) Expression

type AddInt32

type AddInt32 [2]Expression

func (AddInt32) Transform

func (x AddInt32) Transform(f func(Expression) Expression) Expression

type AddInt64

type AddInt64 [2]Expression

func (AddInt64) Transform

func (x AddInt64) Transform(f func(Expression) Expression) Expression

type AddInt8

type AddInt8 [2]Expression

func (AddInt8) Transform

func (x AddInt8) Transform(f func(Expression) Expression) Expression

type AddUint16

type AddUint16 [2]Expression

func (AddUint16) Transform

func (x AddUint16) Transform(f func(Expression) Expression) Expression

type AddUint32

type AddUint32 [2]Expression

func (AddUint32) Transform

func (x AddUint32) Transform(f func(Expression) Expression) Expression

type AddUint64

type AddUint64 [2]Expression

func (AddUint64) Transform

func (x AddUint64) Transform(f func(Expression) Expression) Expression

type AddUint8

type AddUint8 [2]Expression

func (AddUint8) Transform

func (x AddUint8) Transform(f func(Expression) Expression) Expression

type After

type After [2]Expression

func (After) Transform

func (x After) Transform(f func(Expression) Expression) Expression

type All

type All struct {
	Argument Expression
}

func (All) Transform

func (x All) Transform(f func(Expression) Expression) Expression

type AllReferrers

type AllReferrers struct {
	Argument Expression
}

func (AllReferrers) Transform

func (x AllReferrers) Transform(f func(Expression) Expression) Expression

type And

type And []Expression

func (And) Transform

func (x And) Transform(f func(Expression) Expression) Expression

type AssertAbsent

type AssertAbsent struct {
	Argument Expression
}

func (AssertAbsent) Transform

func (x AssertAbsent) Transform(f func(Expression) Expression) Expression

type AssertCase

type AssertCase struct {
	Value Expression
	Case  string
}

func (AssertCase) Transform

func (x AssertCase) Transform(f func(Expression) Expression) Expression

type AssertModelRef

type AssertModelRef struct {
	Value, Ref Expression
}

func (AssertModelRef) Transform

func (x AssertModelRef) Transform(f func(Expression) Expression) Expression

type AssertPresent

type AssertPresent struct {
	Argument Expression
}

func (AssertPresent) Transform

func (x AssertPresent) Transform(f func(Expression) Expression) Expression

type Before

type Before [2]Expression

func (Before) Transform

func (x Before) Transform(f func(Expression) Expression) Expression

type ConcatLists

type ConcatLists [2]Expression

func (ConcatLists) Transform

func (x ConcatLists) Transform(f func(Expression) Expression) Expression

type Create

type Create struct {
	In    Expression
	Value Function
}

func (Create) Transform

func (x Create) Transform(f func(Expression) Expression) Expression

type CreateMultiple

type CreateMultiple struct {
	In     Expression
	Values map[string]Function
}

func (CreateMultiple) Transform

func (x CreateMultiple) Transform(f func(Expression) Expression) Expression

type CurrentUser

type CurrentUser struct{}

func (CurrentUser) Transform

func (x CurrentUser) Transform(f func(Expression) Expression) Expression

type DateTimeNow

type DateTimeNow struct{}

func (DateTimeNow) Transform

func (x DateTimeNow) Transform(f func(Expression) Expression) Expression

type Define

type Define struct {
	Name     string
	Argument Expression
}

func (Define) Transform

func (x Define) Transform(f func(Expression) Expression) Expression

type Delete

type Delete struct {
	Argument Expression
}

func (Delete) Transform

func (x Delete) Transform(f func(Expression) Expression) Expression

type DivFloat

type DivFloat [2]Expression

func (DivFloat) Transform

func (x DivFloat) Transform(f func(Expression) Expression) Expression

type DivInt16

type DivInt16 [2]Expression

func (DivInt16) Transform

func (x DivInt16) Transform(f func(Expression) Expression) Expression

type DivInt32

type DivInt32 [2]Expression

func (DivInt32) Transform

func (x DivInt32) Transform(f func(Expression) Expression) Expression

type DivInt64

type DivInt64 [2]Expression

func (DivInt64) Transform

func (x DivInt64) Transform(f func(Expression) Expression) Expression

type DivInt8

type DivInt8 [2]Expression

func (DivInt8) Transform

func (x DivInt8) Transform(f func(Expression) Expression) Expression

type DivUint16

type DivUint16 [2]Expression

func (DivUint16) Transform

func (x DivUint16) Transform(f func(Expression) Expression) Expression

type DivUint32

type DivUint32 [2]Expression

func (DivUint32) Transform

func (x DivUint32) Transform(f func(Expression) Expression) Expression

type DivUint64

type DivUint64 [2]Expression

func (DivUint64) Transform

func (x DivUint64) Transform(f func(Expression) Expression) Expression

type DivUint8

type DivUint8 [2]Expression

func (DivUint8) Transform

func (x DivUint8) Transform(f func(Expression) Expression) Expression

type Equal

type Equal [2]Expression

func (Equal) Transform

func (x Equal) Transform(f func(Expression) Expression) Expression

type Expression

type Expression interface {
	Transform(f func(Expression) Expression) Expression
}

func DataExpressionFromValue

func DataExpressionFromValue(v val.Value) Expression

func ExpressionFromValue

func ExpressionFromValue(v val.Value) Expression

func TransformIdentity

func TransformIdentity(m Expression) Expression

TransformIdentity is the identity function for Expressions

type ExtractStrings

type ExtractStrings struct {
	Argument Expression
}

func (ExtractStrings) Transform

func (x ExtractStrings) Transform(f func(Expression) Expression) Expression

type Field

type Field struct {
	Name  string
	Value Expression
}

func (Field) Transform

func (x Field) Transform(f func(Expression) Expression) Expression

type FilterList

type FilterList struct {
	Value  Expression
	Filter Function
}

func (FilterList) Transform

func (x FilterList) Transform(f func(Expression) Expression) Expression

type First

type First struct {
	Argument Expression
}

func (First) Transform

func (x First) Transform(f func(Expression) Expression) Expression

type Function

type Function interface {
	Parameters() []string
	Expressions() []Expression
}

func FunctionFromValue

func FunctionFromValue(v val.Value) Function

func NewFunction

func NewFunction(args []string, exprs ...Expression) Function

type FunctionSignature

type FunctionSignature struct {
	Function Function
}

func (FunctionSignature) Transform

func (x FunctionSignature) Transform(f func(Expression) Expression) Expression

type Get

type Get struct {
	Argument Expression
}

func (Get) Transform

func (x Get) Transform(f func(Expression) Expression) Expression

type GraphFlow

type GraphFlow struct {
	Start Expression
	Flow  []GraphFlowParam
}

func (GraphFlow) Transform

func (x GraphFlow) Transform(f func(Expression) Expression) Expression

type GraphFlowParam

type GraphFlowParam struct {
	From     Expression
	Forward  []Expression
	Backward []Expression
}

GraphFlowParam is not an Expression

type GtFloat

type GtFloat [2]Expression

func (GtFloat) Transform

func (x GtFloat) Transform(f func(Expression) Expression) Expression

type GtInt16

type GtInt16 [2]Expression

func (GtInt16) Transform

func (x GtInt16) Transform(f func(Expression) Expression) Expression

type GtInt32

type GtInt32 [2]Expression

func (GtInt32) Transform

func (x GtInt32) Transform(f func(Expression) Expression) Expression

type GtInt64

type GtInt64 [2]Expression

func (GtInt64) Transform

func (x GtInt64) Transform(f func(Expression) Expression) Expression

type GtInt8

type GtInt8 [2]Expression

func (GtInt8) Transform

func (x GtInt8) Transform(f func(Expression) Expression) Expression

type GtUint16

type GtUint16 [2]Expression

func (GtUint16) Transform

func (x GtUint16) Transform(f func(Expression) Expression) Expression

type GtUint32

type GtUint32 [2]Expression

func (GtUint32) Transform

func (x GtUint32) Transform(f func(Expression) Expression) Expression

type GtUint64

type GtUint64 [2]Expression

func (GtUint64) Transform

func (x GtUint64) Transform(f func(Expression) Expression) Expression

type GtUint8

type GtUint8 [2]Expression

func (GtUint8) Transform

func (x GtUint8) Transform(f func(Expression) Expression) Expression

type If

type If struct {
	Condition, Then, Else Expression
}

func (If) Transform

func (x If) Transform(f func(Expression) Expression) Expression

type InList

type InList struct {
	Value, In Expression
}

func (InList) Transform

func (x InList) Transform(f func(Expression) Expression) Expression

type IndexTuple

type IndexTuple struct {
	Value  Expression
	Number val.Int64
}

func (IndexTuple) Transform

func (x IndexTuple) Transform(f func(Expression) Expression) Expression

type IsCase

type IsCase struct {
	Value, Case Expression
}

func (IsCase) Transform

func (x IsCase) Transform(f func(Expression) Expression) Expression

type IsPresent

type IsPresent struct {
	Argument Expression
}

func (IsPresent) Transform

func (x IsPresent) Transform(f func(Expression) Expression) Expression

type JoinStrings

type JoinStrings struct {
	Strings, Separator Expression
}

func (JoinStrings) Transform

func (x JoinStrings) Transform(f func(Expression) Expression) Expression

type Key

type Key struct {
	Name, Value Expression
}

func (Key) Transform

func (x Key) Transform(f func(Expression) Expression) Expression

type LeftFoldList

type LeftFoldList struct {
	List    Expression
	Initial Expression
	Reducer Function
}

func (LeftFoldList) Transform

func (x LeftFoldList) Transform(f func(Expression) Expression) Expression

type Length

type Length struct {
	Argument Expression
}

func (Length) Transform

func (x Length) Transform(f func(Expression) Expression) Expression

type Literal

type Literal struct {
	Value val.Value
}

func (Literal) Transform

func (x Literal) Transform(f func(Expression) Expression) Expression

type LtFloat

type LtFloat [2]Expression

func (LtFloat) Transform

func (x LtFloat) Transform(f func(Expression) Expression) Expression

type LtInt16

type LtInt16 [2]Expression

func (LtInt16) Transform

func (x LtInt16) Transform(f func(Expression) Expression) Expression

type LtInt32

type LtInt32 [2]Expression

func (LtInt32) Transform

func (x LtInt32) Transform(f func(Expression) Expression) Expression

type LtInt64

type LtInt64 [2]Expression

func (LtInt64) Transform

func (x LtInt64) Transform(f func(Expression) Expression) Expression

type LtInt8

type LtInt8 [2]Expression

func (LtInt8) Transform

func (x LtInt8) Transform(f func(Expression) Expression) Expression

type LtUint16

type LtUint16 [2]Expression

func (LtUint16) Transform

func (x LtUint16) Transform(f func(Expression) Expression) Expression

type LtUint32

type LtUint32 [2]Expression

func (LtUint32) Transform

func (x LtUint32) Transform(f func(Expression) Expression) Expression

type LtUint64

type LtUint64 [2]Expression

func (LtUint64) Transform

func (x LtUint64) Transform(f func(Expression) Expression) Expression

type LtUint8

type LtUint8 [2]Expression

func (LtUint8) Transform

func (x LtUint8) Transform(f func(Expression) Expression) Expression

type MapEnum

type MapEnum struct {
	Symbol     Expression
	Default    string
	HasDefault bool
	Mapping    map[string]string
}

func (MapEnum) Transform

func (x MapEnum) Transform(f func(Expression) Expression) Expression

type MapList

type MapList struct {
	Value   Expression
	Mapping Function
}

func (MapList) Transform

func (x MapList) Transform(f func(Expression) Expression) Expression

type MapMap

type MapMap struct {
	Value   Expression
	Mapping Function
}

func (MapMap) Transform

func (x MapMap) Transform(f func(Expression) Expression) Expression

type MapSet

type MapSet struct {
	Value   Expression
	Mapping Function
}

func (MapSet) Transform

func (x MapSet) Transform(f func(Expression) Expression) Expression

type MatchRegex

type MatchRegex struct {
	Value           Expression
	Regex           string
	MultiLine       bool
	CaseInsensitive bool
}

func (MatchRegex) Transform

func (x MatchRegex) Transform(f func(Expression) Expression) Expression

type MemSort

type MemSort struct {
	Value Expression
	Order Function
}

func (MemSort) Transform

func (x MemSort) Transform(f func(Expression) Expression) Expression

type MemSortFunction

type MemSortFunction struct {
	List Expression
	Less Function
}

func (MemSortFunction) Transform

func (x MemSortFunction) Transform(f func(Expression) Expression) Expression

type Metarialize

type Metarialize struct {
	Argument Expression
}

func (Metarialize) Transform

func (x Metarialize) Transform(f func(Expression) Expression) Expression

type Model

type Model struct {
	Argument Expression
}

func (Model) Transform

func (x Model) Transform(f func(Expression) Expression) Expression

type ModelOf

type ModelOf struct {
	Argument Expression
}

func (ModelOf) Transform

func (x ModelOf) Transform(f func(Expression) Expression) Expression

type MulFloat

type MulFloat [2]Expression

func (MulFloat) Transform

func (x MulFloat) Transform(f func(Expression) Expression) Expression

type MulInt16

type MulInt16 [2]Expression

func (MulInt16) Transform

func (x MulInt16) Transform(f func(Expression) Expression) Expression

type MulInt32

type MulInt32 [2]Expression

func (MulInt32) Transform

func (x MulInt32) Transform(f func(Expression) Expression) Expression

type MulInt64

type MulInt64 [2]Expression

func (MulInt64) Transform

func (x MulInt64) Transform(f func(Expression) Expression) Expression

type MulInt8

type MulInt8 [2]Expression

func (MulInt8) Transform

func (x MulInt8) Transform(f func(Expression) Expression) Expression

type MulUint16

type MulUint16 [2]Expression

func (MulUint16) Transform

func (x MulUint16) Transform(f func(Expression) Expression) Expression

type MulUint32

type MulUint32 [2]Expression

func (MulUint32) Transform

func (x MulUint32) Transform(f func(Expression) Expression) Expression

type MulUint64

type MulUint64 [2]Expression

func (MulUint64) Transform

func (x MulUint64) Transform(f func(Expression) Expression) Expression

type MulUint8

type MulUint8 [2]Expression

func (MulUint8) Transform

func (x MulUint8) Transform(f func(Expression) Expression) Expression

type NewBool

type NewBool struct {
	Argument Expression
}

func (NewBool) Transform

func (x NewBool) Transform(f func(Expression) Expression) Expression

type NewDateTime

type NewDateTime struct {
	Argument Expression
}

func (NewDateTime) Transform

func (x NewDateTime) Transform(f func(Expression) Expression) Expression

type NewFloat

type NewFloat struct {
	Argument Expression
}

func (NewFloat) Transform

func (x NewFloat) Transform(f func(Expression) Expression) Expression

type NewInt16

type NewInt16 struct {
	Argument Expression
}

func (NewInt16) Transform

func (x NewInt16) Transform(f func(Expression) Expression) Expression

type NewInt32

type NewInt32 struct {
	Argument Expression
}

func (NewInt32) Transform

func (x NewInt32) Transform(f func(Expression) Expression) Expression

type NewInt64

type NewInt64 struct {
	Argument Expression
}

func (NewInt64) Transform

func (x NewInt64) Transform(f func(Expression) Expression) Expression

type NewInt8

type NewInt8 struct {
	Argument Expression
}

func (NewInt8) Transform

func (x NewInt8) Transform(f func(Expression) Expression) Expression

type NewList

type NewList []Expression

func (NewList) Transform

func (x NewList) Transform(f func(Expression) Expression) Expression

type NewMap

type NewMap map[string]Expression

func (NewMap) Transform

func (x NewMap) Transform(f func(Expression) Expression) Expression

type NewRef

type NewRef struct {
	Model, Id Expression
}

func (NewRef) Transform

func (x NewRef) Transform(f func(Expression) Expression) Expression

type NewSet

type NewSet []Expression

func (NewSet) Transform

func (x NewSet) Transform(f func(Expression) Expression) Expression

type NewString

type NewString struct {
	Argument Expression
}

func (NewString) Transform

func (x NewString) Transform(f func(Expression) Expression) Expression

type NewStruct

type NewStruct map[string]Expression

func (NewStruct) Transform

func (x NewStruct) Transform(f func(Expression) Expression) Expression

type NewTuple

type NewTuple []Expression

func (NewTuple) Transform

func (x NewTuple) Transform(f func(Expression) Expression) Expression

type NewUint16

type NewUint16 struct {
	Argument Expression
}

func (NewUint16) Transform

func (x NewUint16) Transform(f func(Expression) Expression) Expression

type NewUint32

type NewUint32 struct {
	Argument Expression
}

func (NewUint32) Transform

func (x NewUint32) Transform(f func(Expression) Expression) Expression

type NewUint64

type NewUint64 struct {
	Argument Expression
}

func (NewUint64) Transform

func (x NewUint64) Transform(f func(Expression) Expression) Expression

type NewUint8

type NewUint8 struct {
	Argument Expression
}

func (NewUint8) Transform

func (x NewUint8) Transform(f func(Expression) Expression) Expression

type NewUnion

type NewUnion struct {
	Case  string
	Value Expression
}

func (NewUnion) Transform

func (x NewUnion) Transform(f func(Expression) Expression) Expression

type Not

type Not struct {
	Argument Expression
}

func (Not) Transform

func (x Not) Transform(f func(Expression) Expression) Expression

type Or

type Or []Expression

func (Or) Transform

func (x Or) Transform(f func(Expression) Expression) Expression

type PresentOrZero

type PresentOrZero struct {
	Argument Expression
}

func (PresentOrZero) Transform

func (x PresentOrZero) Transform(f func(Expression) Expression) Expression

type ReduceList

type ReduceList struct {
	Value   Expression
	Initial Expression
	Reducer Function
}

func (ReduceList) Transform

func (x ReduceList) Transform(f func(Expression) Expression) Expression

type RefTo

type RefTo struct {
	Argument Expression
}

func (RefTo) Transform

func (x RefTo) Transform(f func(Expression) Expression) Expression

type Referred

type Referred struct {
	From, In Expression
}

func (Referred) Transform

func (x Referred) Transform(f func(Expression) Expression) Expression

type Referrers

type Referrers struct {
	Of, In Expression
}

func (Referrers) Transform

func (x Referrers) Transform(f func(Expression) Expression) Expression

type RelocateRef

type RelocateRef struct {
	Ref   Expression
	Model Expression
}

func (RelocateRef) Transform

func (x RelocateRef) Transform(f func(Expression) Expression) Expression

type ResolveAllRefs

type ResolveAllRefs struct {
	Argument Expression
}

func (ResolveAllRefs) Transform

func (x ResolveAllRefs) Transform(f func(Expression) Expression) Expression

type ResolveRefs

type ResolveRefs struct {
	Value  Expression
	Models []Expression
}

func (ResolveRefs) Transform

func (x ResolveRefs) Transform(f func(Expression) Expression) Expression

type ReverseList

type ReverseList struct {
	Argument Expression
}

func (ReverseList) Transform

func (x ReverseList) Transform(f func(Expression) Expression) Expression

type RightFoldList

type RightFoldList struct {
	List    Expression
	Initial Expression
	Reducer Function
}

func (RightFoldList) Transform

func (x RightFoldList) Transform(f func(Expression) Expression) Expression

type Scope

type Scope string

func (Scope) Transform

func (x Scope) Transform(f func(Expression) Expression) Expression

type SearchAllRegex

type SearchAllRegex struct {
	Value           Expression
	Regex           string
	MultiLine       bool
	CaseInsensitive bool
}

func (SearchAllRegex) Transform

func (x SearchAllRegex) Transform(f func(Expression) Expression) Expression

type SearchRegex

type SearchRegex struct {
	Value           Expression
	Regex           string
	MultiLine       bool
	CaseInsensitive bool
}

func (SearchRegex) Transform

func (x SearchRegex) Transform(f func(Expression) Expression) Expression

type SetField

type SetField struct {
	Name  string
	Value Expression
	In    Expression
}

func (SetField) Transform

func (x SetField) Transform(f func(Expression) Expression) Expression

type SetKey

type SetKey struct {
	Name  Expression
	Value Expression
	In    Expression
}

func (SetKey) Transform

func (x SetKey) Transform(f func(Expression) Expression) Expression

type Slice

type Slice struct {
	Value  Expression
	Offset Expression
	Length Expression
}

func (Slice) Transform

func (x Slice) Transform(f func(Expression) Expression) Expression

type StringContains

type StringContains struct {
	String Expression
	Search Expression
}

func (StringContains) Transform

func (x StringContains) Transform(f func(Expression) Expression) Expression

type StringToLower

type StringToLower struct {
	Argument Expression
}

func (StringToLower) Transform

func (x StringToLower) Transform(f func(Expression) Expression) Expression

type SubFloat

type SubFloat [2]Expression

func (SubFloat) Transform

func (x SubFloat) Transform(f func(Expression) Expression) Expression

type SubInt16

type SubInt16 [2]Expression

func (SubInt16) Transform

func (x SubInt16) Transform(f func(Expression) Expression) Expression

type SubInt32

type SubInt32 [2]Expression

func (SubInt32) Transform

func (x SubInt32) Transform(f func(Expression) Expression) Expression

type SubInt64

type SubInt64 [2]Expression

func (SubInt64) Transform

func (x SubInt64) Transform(f func(Expression) Expression) Expression

type SubInt8

type SubInt8 [2]Expression

func (SubInt8) Transform

func (x SubInt8) Transform(f func(Expression) Expression) Expression

type SubUint16

type SubUint16 [2]Expression

func (SubUint16) Transform

func (x SubUint16) Transform(f func(Expression) Expression) Expression

type SubUint32

type SubUint32 [2]Expression

func (SubUint32) Transform

func (x SubUint32) Transform(f func(Expression) Expression) Expression

type SubUint64

type SubUint64 [2]Expression

func (SubUint64) Transform

func (x SubUint64) Transform(f func(Expression) Expression) Expression

type SubUint8

type SubUint8 [2]Expression

func (SubUint8) Transform

func (x SubUint8) Transform(f func(Expression) Expression) Expression

type SubstringIndex

type SubstringIndex struct {
	String Expression
	Search Expression
}

func (SubstringIndex) Transform

func (x SubstringIndex) Transform(f func(Expression) Expression) Expression

type SwitchCase

type SwitchCase struct {
	Value Expression
	Cases map[string]Function
}

func (SwitchCase) Transform

func (x SwitchCase) Transform(f func(Expression) Expression) Expression

type SwitchModelRef

type SwitchModelRef struct {
	Value   Expression
	Default Expression
	Cases   []SwitchModelRefCase
}

func (SwitchModelRef) Transform

func (x SwitchModelRef) Transform(f func(Expression) Expression) Expression

type SwitchModelRefCase

type SwitchModelRefCase struct {
	Match  Expression
	Return Function
}

SwitchModelRefCase is not an Expression

type Tag

type Tag struct {
	Argument Expression
}

func (Tag) Transform

func (x Tag) Transform(f func(Expression) Expression) Expression

type TagExists

type TagExists struct {
	Argument Expression
}

func (TagExists) Transform

func (x TagExists) Transform(f func(Expression) Expression) Expression

type ToFloat

type ToFloat struct {
	Expression Expression
}

func (ToFloat) Transform

func (x ToFloat) Transform(f func(Expression) Expression) Expression

type ToInt16

type ToInt16 struct {
	Expression Expression
}

func (ToInt16) Transform

func (x ToInt16) Transform(f func(Expression) Expression) Expression

type ToInt32

type ToInt32 struct {
	Expression Expression
}

func (ToInt32) Transform

func (x ToInt32) Transform(f func(Expression) Expression) Expression

type ToInt64

type ToInt64 struct {
	Expression Expression
}

func (ToInt64) Transform

func (x ToInt64) Transform(f func(Expression) Expression) Expression

type ToInt8

type ToInt8 struct {
	Expression Expression
}

func (ToInt8) Transform

func (x ToInt8) Transform(f func(Expression) Expression) Expression

type ToUint16

type ToUint16 struct {
	Expression Expression
}

func (ToUint16) Transform

func (x ToUint16) Transform(f func(Expression) Expression) Expression

type ToUint32

type ToUint32 struct {
	Expression Expression
}

func (ToUint32) Transform

func (x ToUint32) Transform(f func(Expression) Expression) Expression

type ToUint64

type ToUint64 struct {
	Expression Expression
}

func (ToUint64) Transform

func (x ToUint64) Transform(f func(Expression) Expression) Expression

type ToUint8

type ToUint8 struct {
	Expression Expression
}

func (ToUint8) Transform

func (x ToUint8) Transform(f func(Expression) Expression) Expression

type TypedExpression

type TypedExpression struct {
	Expression
	Expected mdl.Model
	Actual   mdl.Model
}

func (TypedExpression) Transform

func (x TypedExpression) Transform(f func(Expression) Expression) Expression

type TypedFunction

type TypedFunction struct {
	Function
	Arguments []mdl.Model
	Expected  mdl.Model
	Actual    mdl.Model
}

type Update

type Update struct {
	Ref, Value Expression
}

func (Update) Transform

func (x Update) Transform(f func(Expression) Expression) Expression

type With

type With struct {
	Value  Expression
	Return Function
}

func (With) Transform

func (x With) Transform(f func(Expression) Expression) Expression

type Zero

type Zero struct{}

func (Zero) Transform

func (x Zero) Transform(f func(Expression) Expression) Expression

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL