call

package
v0.24.6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: BSD-3-Clause Imports: 14 Imported by: 1

Documentation

Overview

Pattern calls, argument handling, and related helpers.

Index

Constants

This section is empty.

Variables

View Source
var Z_Types = typeinfo.TypeSet{
	Name: "call",
	Comment: []string{
		"Pattern calls, argument handling, and related helpers.",
	},

	Slot:       z_slot_list,
	Flow:       z_flow_list,
	Signatures: z_signatures,
}

package listing of type data

View Source
var Zt_ActivePattern typeinfo.Flow

active_pattern, a type of flow.

View Source
var Zt_ActiveScene typeinfo.Flow

active_scene, a type of flow.

arg, a type of flow.

View Source
var Zt_CallPattern typeinfo.Flow

call_pattern, a type of flow.

View Source
var Zt_CallTrigger typeinfo.Flow

call_trigger, a type of flow.

View Source
var Zt_FromAddress typeinfo.Flow

from_address, a type of flow.

View Source
var Zt_FromBool typeinfo.Flow

from_bool, a type of flow.

View Source
var Zt_FromExe typeinfo.Flow

from_exe, a type of flow.

View Source
var Zt_FromNum typeinfo.Flow

from_num, a type of flow.

View Source
var Zt_FromNumList typeinfo.Flow

from_num_list, a type of flow.

View Source
var Zt_FromRecord typeinfo.Flow

from_record, a type of flow.

View Source
var Zt_FromRecordList typeinfo.Flow

from_record_list, a type of flow.

View Source
var Zt_FromText typeinfo.Flow

from_text, a type of flow.

View Source
var Zt_FromTextList typeinfo.Flow

from_text_list, a type of flow.

View Source
var Zt_Trigger = typeinfo.Slot{
	Name: "trigger",
	Markup: map[string]any{
		"comment":  "Helper for counting values.",
		"internal": true,
	},
}

trigger, a type of slot.

View Source
var Zt_TriggerCycle typeinfo.Flow

trigger_cycle, a type of flow.

View Source
var Zt_TriggerOnce typeinfo.Flow

trigger_once, a type of flow.

View Source
var Zt_TriggerSwitch typeinfo.Flow

trigger_switch, a type of flow.

Functions

func CustomEncoder

func CustomEncoder(enc *encode.Encoder, op typeinfo.Instance) (ret any, err error)

func ExpandArgs

func ExpandArgs(run rt.Runtime, args []Arg) (retKeys []string, retVals []rt.Value, err error)

func GetAffinity

func GetAffinity(a rt.Assignment) (ret affine.Affinity)

func Literal

func Literal(v literal.LiteralValue) (ret rt.Assignment)

turn a literal into an assignment ( whats's the right package for this function? )

Types

type ActivePattern

type ActivePattern struct {
	PatternName string
	Markup      map[string]any
}

Determine whether a pattern is running.

The [rtti.num_eval] version returns the distance to the pattern.

func (*ActivePattern) GetBool

func (op *ActivePattern) GetBool(run rt.Runtime) (ret rt.Value, err error)

GetBool returns the first matching bool evaluation.

func (*ActivePattern) GetMarkup

func (op *ActivePattern) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ActivePattern) GetNum

func (op *ActivePattern) GetNum(run rt.Runtime) (ret rt.Value, err error)

func (*ActivePattern) TypeInfo

func (*ActivePattern) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ActivePattern_Slice

type ActivePattern_Slice []ActivePattern

Holds a slice of type ActivePattern.

func (*ActivePattern_Slice) Repeats

func (op *ActivePattern_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ActivePattern.

func (*ActivePattern_Slice) TypeInfo

func (*ActivePattern_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ActivePattern.

type ActiveScene

type ActiveScene struct {
	Name   string
	Markup map[string]any
}

Determine whether a scene (aka domain) is active.

func (*ActiveScene) GetBool

func (op *ActiveScene) GetBool(run rt.Runtime) (ret rt.Value, err error)

func (*ActiveScene) GetMarkup

func (op *ActiveScene) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*ActiveScene) TypeInfo

func (*ActiveScene) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type ActiveScene_Slice

type ActiveScene_Slice []ActiveScene

Holds a slice of type ActiveScene.

func (*ActiveScene_Slice) Repeats

func (op *ActiveScene_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of ActiveScene.

func (*ActiveScene_Slice) TypeInfo

func (*ActiveScene_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of ActiveScene.

type Arg

type Arg struct {
	Name   string
	Value  rtti.Assignment
	Markup map[string]any
}

Pass a named value to a parameterized call.

func MakeArgs

func MakeArgs(as ...rt.Assignment) (ret []Arg)

turn a series of assignments ( FromX commands ) into a slice of arguments.

func (*Arg) GetMarkup

func (op *Arg) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*Arg) TypeInfo

func (*Arg) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type Arg_Slice

type Arg_Slice []Arg

Holds a slice of type Arg.

func (*Arg_Slice) Repeats

func (op *Arg_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of Arg.

func (*Arg_Slice) TypeInfo

func (*Arg_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of Arg.

type CallPattern

type CallPattern struct {
	PatternName string
	Arguments   []Arg
	Markup      map[string]any
}

Run a pattern, returning its result (if any). Tell files support calling patterns directly, so this is only needed when using the blockly editor.

func (*CallPattern) Execute

func (op *CallPattern) Execute(run rt.Runtime) error

func (*CallPattern) GetBool

func (op *CallPattern) GetBool(run rt.Runtime) (rt.Value, error)

func (*CallPattern) GetMarkup

func (op *CallPattern) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*CallPattern) GetNum

func (op *CallPattern) GetNum(run rt.Runtime) (rt.Value, error)

func (*CallPattern) GetNumList

func (op *CallPattern) GetNumList(run rt.Runtime) (rt.Value, error)

func (*CallPattern) GetRecord

func (op *CallPattern) GetRecord(run rt.Runtime) (rt.Value, error)

func (*CallPattern) GetRecordList

func (op *CallPattern) GetRecordList(run rt.Runtime) (rt.Value, error)

func (*CallPattern) GetText

func (op *CallPattern) GetText(run rt.Runtime) (rt.Value, error)

func (*CallPattern) GetTextList

func (op *CallPattern) GetTextList(run rt.Runtime) (rt.Value, error)

func (*CallPattern) TypeInfo

func (*CallPattern) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type CallPattern_Slice

type CallPattern_Slice []CallPattern

Holds a slice of type CallPattern.

func (*CallPattern_Slice) Repeats

func (op *CallPattern_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of CallPattern.

func (*CallPattern_Slice) TypeInfo

func (*CallPattern_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of CallPattern.

type CallTrigger

type CallTrigger struct {
	Name    string
	Trigger Trigger
	Num     rtti.NumEval
	Markup  map[string]any
}

Runtime version of count_of. A guard which returns true based on a counter.

func (*CallTrigger) GetBool

func (op *CallTrigger) GetBool(run rt.Runtime) (ret rt.Value, err error)

func (*CallTrigger) GetMarkup

func (op *CallTrigger) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*CallTrigger) TypeInfo

func (*CallTrigger) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type CallTrigger_Slice

type CallTrigger_Slice []CallTrigger

Holds a slice of type CallTrigger.

func (*CallTrigger_Slice) Repeats

func (op *CallTrigger_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of CallTrigger.

func (*CallTrigger_Slice) TypeInfo

func (*CallTrigger_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of CallTrigger.

type FromAddress

type FromAddress struct {
	Value  rtti.Address
	Markup map[string]any
}

Provide a stored value for an assignment.

func (*FromAddress) GetAssignedValue

func (op *FromAddress) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromAddress) GetMarkup

func (op *FromAddress) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromAddress) TypeInfo

func (*FromAddress) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromAddress_Slice

type FromAddress_Slice []FromAddress

Holds a slice of type FromAddress.

func (*FromAddress_Slice) Repeats

func (op *FromAddress_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromAddress.

func (*FromAddress_Slice) TypeInfo

func (*FromAddress_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromAddress.

type FromBool

type FromBool struct {
	Value  rtti.BoolEval
	Markup map[string]any
}

Provide a boolean value for an assignment.

func (*FromBool) GetAssignedValue

func (op *FromBool) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromBool) GetMarkup

func (op *FromBool) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromBool) TypeInfo

func (*FromBool) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromBool_Slice

type FromBool_Slice []FromBool

Holds a slice of type FromBool.

func (*FromBool_Slice) Repeats

func (op *FromBool_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromBool.

func (*FromBool_Slice) TypeInfo

func (*FromBool_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromBool.

type FromExe

type FromExe struct {
	Exe    []rtti.Execute
	Markup map[string]any
}

Provide one or more execute commands for an assignment. Used internally for jess rules.

func (*FromExe) GetAssignedValue

func (op *FromExe) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromExe) GetMarkup

func (op *FromExe) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromExe) TypeInfo

func (*FromExe) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromExe_Slice

type FromExe_Slice []FromExe

Holds a slice of type FromExe.

func (*FromExe_Slice) Repeats

func (op *FromExe_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromExe.

func (*FromExe_Slice) TypeInfo

func (*FromExe_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromExe.

type FromNum

type FromNum struct {
	Value  rtti.NumEval
	Markup map[string]any
}

Provide a number for an assignment.

func (*FromNum) GetAssignedValue

func (op *FromNum) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromNum) GetMarkup

func (op *FromNum) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromNum) TypeInfo

func (*FromNum) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromNumList

type FromNumList struct {
	Value  rtti.NumListEval
	Markup map[string]any
}

Provide a list of numbers for an assignment.

func (*FromNumList) GetAssignedValue

func (op *FromNumList) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromNumList) GetMarkup

func (op *FromNumList) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromNumList) TypeInfo

func (*FromNumList) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromNumList_Slice

type FromNumList_Slice []FromNumList

Holds a slice of type FromNumList.

func (*FromNumList_Slice) Repeats

func (op *FromNumList_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromNumList.

func (*FromNumList_Slice) TypeInfo

func (*FromNumList_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromNumList.

type FromNum_Slice

type FromNum_Slice []FromNum

Holds a slice of type FromNum.

func (*FromNum_Slice) Repeats

func (op *FromNum_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromNum.

func (*FromNum_Slice) TypeInfo

func (*FromNum_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromNum.

type FromRecord

type FromRecord struct {
	Value  rtti.RecordEval
	Markup map[string]any
}

Provide a record for an assignment.

func (*FromRecord) GetAssignedValue

func (op *FromRecord) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromRecord) GetMarkup

func (op *FromRecord) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromRecord) TypeInfo

func (*FromRecord) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromRecordList

type FromRecordList struct {
	Value  rtti.RecordListEval
	Markup map[string]any
}

Provide a list of records for an assignment.

func (*FromRecordList) GetAssignedValue

func (op *FromRecordList) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromRecordList) GetMarkup

func (op *FromRecordList) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromRecordList) TypeInfo

func (*FromRecordList) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromRecordList_Slice

type FromRecordList_Slice []FromRecordList

Holds a slice of type FromRecordList.

func (*FromRecordList_Slice) Repeats

func (op *FromRecordList_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromRecordList.

func (*FromRecordList_Slice) TypeInfo

func (*FromRecordList_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromRecordList.

type FromRecord_Slice

type FromRecord_Slice []FromRecord

Holds a slice of type FromRecord.

func (*FromRecord_Slice) Repeats

func (op *FromRecord_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromRecord.

func (*FromRecord_Slice) TypeInfo

func (*FromRecord_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromRecord.

type FromText

type FromText struct {
	Value  rtti.TextEval
	Markup map[string]any
}

Provide some text for an assignment.

func (*FromText) GetAssignedValue

func (op *FromText) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromText) GetMarkup

func (op *FromText) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromText) TypeInfo

func (*FromText) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromTextList

type FromTextList struct {
	Value  rtti.TextListEval
	Markup map[string]any
}

Provide a list of text values for an assignment.

func (*FromTextList) GetAssignedValue

func (op *FromTextList) GetAssignedValue(run rt.Runtime) (ret rt.Value, err error)

func (*FromTextList) GetMarkup

func (op *FromTextList) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*FromTextList) TypeInfo

func (*FromTextList) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type FromTextList_Slice

type FromTextList_Slice []FromTextList

Holds a slice of type FromTextList.

func (*FromTextList_Slice) Repeats

func (op *FromTextList_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromTextList.

func (*FromTextList_Slice) TypeInfo

func (*FromTextList_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromTextList.

type FromText_Slice

type FromText_Slice []FromText

Holds a slice of type FromText.

func (*FromText_Slice) Repeats

func (op *FromText_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of FromText.

func (*FromText_Slice) TypeInfo

func (*FromText_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of FromText.

type Trigger

type Trigger interface{ Trigger() Trigger }

type TriggerCycle

type TriggerCycle struct {
	Markup map[string]any
}

call_trigger

func (*TriggerCycle) GetMarkup

func (op *TriggerCycle) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*TriggerCycle) Trigger

func (op *TriggerCycle) Trigger() Trigger

func (*TriggerCycle) TypeInfo

func (*TriggerCycle) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type TriggerCycle_Slice

type TriggerCycle_Slice []TriggerCycle

Holds a slice of type TriggerCycle.

func (*TriggerCycle_Slice) Repeats

func (op *TriggerCycle_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of TriggerCycle.

func (*TriggerCycle_Slice) TypeInfo

func (*TriggerCycle_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of TriggerCycle.

type TriggerOnce

type TriggerOnce struct {
	Markup map[string]any
}

call_trigger

func (*TriggerOnce) GetMarkup

func (op *TriggerOnce) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*TriggerOnce) Trigger

func (op *TriggerOnce) Trigger() Trigger

func (*TriggerOnce) TypeInfo

func (*TriggerOnce) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type TriggerOnce_Slice

type TriggerOnce_Slice []TriggerOnce

Holds a slice of type TriggerOnce.

func (*TriggerOnce_Slice) Repeats

func (op *TriggerOnce_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of TriggerOnce.

func (*TriggerOnce_Slice) TypeInfo

func (*TriggerOnce_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of TriggerOnce.

type TriggerSwitch

type TriggerSwitch struct {
	Markup map[string]any
}

call_trigger

func (*TriggerSwitch) GetMarkup

func (op *TriggerSwitch) GetMarkup(ensure bool) map[string]any

Implements typeinfo.Markup

func (*TriggerSwitch) Trigger

func (op *TriggerSwitch) Trigger() Trigger

func (*TriggerSwitch) TypeInfo

func (*TriggerSwitch) TypeInfo() typeinfo.T

Implements typeinfo.Instance

type TriggerSwitch_Slice

type TriggerSwitch_Slice []TriggerSwitch

Holds a slice of type TriggerSwitch.

func (*TriggerSwitch_Slice) Repeats

func (op *TriggerSwitch_Slice) Repeats() bool

Implements typeinfo.Repeats for a slice of TriggerSwitch.

func (*TriggerSwitch_Slice) TypeInfo

func (*TriggerSwitch_Slice) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of TriggerSwitch.

type Trigger_Slot

type Trigger_Slot struct{ Value Trigger }

Holds a single slot.

func (*Trigger_Slot) TypeInfo

func (*Trigger_Slot) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a single slot.

type Trigger_Slots

type Trigger_Slots []Trigger

Holds a slice of slots.

func (*Trigger_Slots) Repeats

func (op *Trigger_Slots) Repeats() bool

Implements typeinfo.Repeats for a slice of slots.

func (*Trigger_Slots) TypeInfo

func (*Trigger_Slots) TypeInfo() typeinfo.T

Implements typeinfo.Instance for a slice of slots.

Jump to

Keyboard shortcuts

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