Documentation ¶
Overview ¶
Supply constant values to runtime evaluations. ( ie. a specific number when a [NumEval] is required. )
Tell files support "shortcuts" which turn primitive values into literal commands. For instance, the number '5' in a .tell file is automatically transformed into the command "Num value: 5" whenever that's needed.
Index ¶
- Variables
- func CustomDecoder(_ *decode.Decoder, slot *typeinfo.Slot, body any) (typeinfo.Instance, error)
- func CustomEncoder(enc *encode.Encoder, op typeinfo.Instance) (ret any, err error)
- func DecodeLiteral(slot *typeinfo.Slot, body any) (ret typeinfo.Instance, err error)
- func GetAffinity(a LiteralValue) (ret affine.Affinity)
- func Register(reg func(any))
- type BoolValue
- type BoolValue_Slice
- type FieldList
- type FieldList_Slice
- type FieldValue
- type FieldValue_Slice
- type LiteralValue
- type LiteralValue_Slot
- type LiteralValue_Slots
- type NumList
- type NumList_Slice
- type NumValue
- func (op *NumValue) Float() float64
- func (op *NumValue) GetLiteralValue(rt.Kinds) (ret rt.Value, _ error)
- func (op *NumValue) GetMarkup(ensure bool) map[string]any
- func (op *NumValue) GetNum(run rt.Runtime) (rt.Value, error)
- func (op *NumValue) Int() int
- func (op *NumValue) String() string
- func (*NumValue) TypeInfo() typeinfo.T
- type NumValue_Slice
- type RecordCache
- type RecordList
- type RecordList_Slice
- type RecordValue
- type RecordValue_Slice
- type RecordsCache
- type TextList
- type TextList_Slice
- type TextValue
- type TextValue_Slice
Constants ¶
This section is empty.
Variables ¶
var Z_Types = typeinfo.TypeSet{ Name: "literal", Comment: []string{ "Supply constant values to runtime evaluations.", "( ie. a specific number when a [NumEval] is required. )", "", "Tell files support \"shortcuts\" which turn primitive values into literal commands. For instance, the number '5' in a .tell file is automatically transformed into the command \"Num value: 5\" whenever that's needed.", }, Slot: z_slot_list, Flow: z_flow_list, Signatures: z_signatures, }
package listing of type data
var Zt_BoolValue typeinfo.Flow
bool_value, a type of flow.
var Zt_FieldList typeinfo.Flow
field_list, a type of flow.
var Zt_FieldValue typeinfo.Flow
field_value, a type of flow.
var Zt_LiteralValue = typeinfo.Slot{ Name: "literal_value", Markup: map[string]any{ "blockly-color": "MATH_HUE", "comment": "A slot to identify constant values.", }, }
literal_value, a type of slot.
var Zt_NumList typeinfo.Flow
num_list, a type of flow.
var Zt_NumValue typeinfo.Flow
num_value, a type of flow.
var Zt_RecordList typeinfo.Flow
record_list, a type of flow.
var Zt_RecordValue typeinfo.Flow
record_value, a type of flow.
var Zt_TextList typeinfo.Flow
text_list, a type of flow.
var Zt_TextValue typeinfo.Flow
text_value, a type of flow.
Functions ¶
func CustomDecoder ¶
func CustomEncoder ¶
Write literal commands as plain values. ex. BoolValue becomes a bool (true or false) in the output data.
note: TextValues and NumValues of containing a single value and serialized as that single value ( [6]-> 6 ) because, in theory, that can help simply the specification for authors.
func DecodeLiteral ¶
func GetAffinity ¶
func GetAffinity(a LiteralValue) (ret affine.Affinity)
Types ¶
type BoolValue ¶
Specify an explicit true or false.
func (*BoolValue) GetBool ¶
GetBool implements rt.BoolEval; providing the dl with a boolean literal.
func (*BoolValue) GetLiteralValue ¶
func (*BoolValue) GetMarkup ¶
Implements typeinfo.Markup
type BoolValue_Slice ¶
type BoolValue_Slice []BoolValue
Holds a slice of type BoolValue.
func (*BoolValue_Slice) Repeats ¶
func (op *BoolValue_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of BoolValue.
func (*BoolValue_Slice) TypeInfo ¶
func (*BoolValue_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of BoolValue.
type FieldList ¶
type FieldList struct { Fields []FieldValue Markup map[string]any `json:",omitempty"` }
A series of values used to build a record.
func (*FieldList) GetLiteralValue ¶
unimplemented: panics.
func (*FieldList) GetMarkup ¶
Implements typeinfo.Markup
type FieldList_Slice ¶
type FieldList_Slice []FieldList
Holds a slice of type FieldList.
func (*FieldList_Slice) Repeats ¶
func (op *FieldList_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of FieldList.
func (*FieldList_Slice) TypeInfo ¶
func (*FieldList_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of FieldList.
type FieldValue ¶
type FieldValue struct { FieldName string Value LiteralValue Markup map[string]any `json:",omitempty"` }
The name and value of a field used for initializing a literal record.
func (*FieldValue) GetMarkup ¶
func (op *FieldValue) GetMarkup(ensure bool) map[string]any
Implements typeinfo.Markup
type FieldValue_Slice ¶
type FieldValue_Slice []FieldValue
Holds a slice of type FieldValue.
func (*FieldValue_Slice) Repeats ¶
func (op *FieldValue_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of FieldValue.
func (*FieldValue_Slice) TypeInfo ¶
func (*FieldValue_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of FieldValue.
type LiteralValue_Slot ¶
type LiteralValue_Slot struct{ Value LiteralValue }
Holds a single slot.
func (*LiteralValue_Slot) TypeInfo ¶
func (*LiteralValue_Slot) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a single slot.
type LiteralValue_Slots ¶
type LiteralValue_Slots []LiteralValue
Holds a slice of slots.
func (*LiteralValue_Slots) Repeats ¶
func (op *LiteralValue_Slots) Repeats() bool
Implements typeinfo.Repeats for a slice of slots.
func (*LiteralValue_Slots) TypeInfo ¶
func (*LiteralValue_Slots) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of slots.
type NumList ¶ added in v0.24.6
Specify a list of literal numbers.
func (*NumList) GetLiteralValue ¶ added in v0.24.6
func (*NumList) GetMarkup ¶ added in v0.24.6
Implements typeinfo.Markup
func (*NumList) GetNumList ¶ added in v0.24.6
GetNumList implements rt.NumListEval providing the dl with a literal list of numbers.
type NumList_Slice ¶ added in v0.24.6
type NumList_Slice []NumList
Holds a slice of type NumList.
func (*NumList_Slice) Repeats ¶ added in v0.24.6
func (op *NumList_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of NumList.
func (*NumList_Slice) TypeInfo ¶ added in v0.24.6
func (*NumList_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of NumList.
type NumValue ¶
Specify a particular number.
func (*NumValue) GetLiteralValue ¶
func (*NumValue) GetMarkup ¶
Implements typeinfo.Markup
func (*NumValue) GetNum ¶ added in v0.24.6
GetNum implements rt.NumEval providing the dl with a number literal.
type NumValue_Slice ¶
type NumValue_Slice []NumValue
Holds a slice of type NumValue.
func (*NumValue_Slice) Repeats ¶
func (op *NumValue_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of NumValue.
func (*NumValue_Slice) TypeInfo ¶
func (*NumValue_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of NumValue.
type RecordCache ¶
type RecordCache struct {
// contains filtered or unexported fields
}
func (*RecordCache) GetRecord ¶
func (rc *RecordCache) GetRecord(kinds rt.Kinds, kind string, fields []FieldValue) (ret rt.Value, err error)
type RecordList ¶
type RecordList struct { KindName string Records []FieldList Markup map[string]any `json:",omitempty"` // contains filtered or unexported fields }
Specify a series of records, all of the same kind.
func (*RecordList) GetLiteralValue ¶
func (*RecordList) GetMarkup ¶
func (op *RecordList) GetMarkup(ensure bool) map[string]any
Implements typeinfo.Markup
func (*RecordList) GetRecordList ¶
GetNumList implements rt.RecordListEval providing the dl with a literal list of records.
type RecordList_Slice ¶
type RecordList_Slice []RecordList
Holds a slice of type RecordList.
func (*RecordList_Slice) Repeats ¶
func (op *RecordList_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of RecordList.
func (*RecordList_Slice) TypeInfo ¶
func (*RecordList_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of RecordList.
type RecordValue ¶
type RecordValue struct { KindName string Fields []FieldValue Markup map[string]any `json:",omitempty"` // contains filtered or unexported fields }
Specify a record composed of literal values.
func (*RecordValue) GetLiteralValue ¶
func (*RecordValue) GetMarkup ¶
func (op *RecordValue) GetMarkup(ensure bool) map[string]any
Implements typeinfo.Markup
func (*RecordValue) GetRecord ¶
GetRecord implements interface rt.RecordEval providing the dl with a structured literal.
func (*RecordValue) TypeInfo ¶
func (*RecordValue) TypeInfo() typeinfo.T
Implements typeinfo.Instance
type RecordValue_Slice ¶
type RecordValue_Slice []RecordValue
Holds a slice of type RecordValue.
func (*RecordValue_Slice) Repeats ¶
func (op *RecordValue_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of RecordValue.
func (*RecordValue_Slice) TypeInfo ¶
func (*RecordValue_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of RecordValue.
type RecordsCache ¶
type RecordsCache struct {
// contains filtered or unexported fields
}
func (*RecordsCache) GetRecords ¶
type TextList ¶ added in v0.24.6
Specify a list of literal text values.
func (*TextList) GetLiteralValue ¶ added in v0.24.6
func (*TextList) GetMarkup ¶ added in v0.24.6
Implements typeinfo.Markup
func (*TextList) GetTextList ¶ added in v0.24.6
GetTextList implements rt.TextListEval providing the dl with a literal list of text.
type TextList_Slice ¶ added in v0.24.6
type TextList_Slice []TextList
Holds a slice of type TextList.
func (*TextList_Slice) Repeats ¶ added in v0.24.6
func (op *TextList_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of TextList.
func (*TextList_Slice) TypeInfo ¶ added in v0.24.6
func (*TextList_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of TextList.
type TextValue ¶
Specify some constant text.
func (*TextValue) GetLiteralValue ¶
func (*TextValue) GetMarkup ¶
Implements typeinfo.Markup
type TextValue_Slice ¶
type TextValue_Slice []TextValue
Holds a slice of type TextValue.
func (*TextValue_Slice) Repeats ¶
func (op *TextValue_Slice) Repeats() bool
Implements typeinfo.Repeats for a slice of TextValue.
func (*TextValue_Slice) TypeInfo ¶
func (*TextValue_Slice) TypeInfo() typeinfo.T
Implements typeinfo.Instance for a slice of TextValue.