Documentation
¶
Index ¶
- type ActualNatArg
- type ByteBuilder
- func (b *ByteBuilder) Buf() []byte
- func (b *ByteBuilder) FinishSize(firstUsedByte int, lastUsedByte int, optimizeEmpty bool)
- func (b *ByteBuilder) Len() int
- func (b *ByteBuilder) Print() string
- func (b *ByteBuilder) PrintLegend() string
- func (b *ByteBuilder) ReserveSpaceForSize() int
- func (b *ByteBuilder) SetCursorFinish()
- func (b *ByteBuilder) SetCursorStart()
- func (b *ByteBuilder) WriteElementCount(v int)
- func (b *ByteBuilder) WriteFieldmask()
- func (b *ByteBuilder) WriteString(v string)
- func (b *ByteBuilder) WriteVariantIndex(v int)
- type ByteColor
- type Field
- func (f Field) Bare() bool
- func (f Field) BitNumber() uint32
- func (f Field) CommentBefore() string
- func (f Field) CommentRight() string
- func (f Field) FieldMask() *ActualNatArg
- func (f Field) IsBit() bool
- func (f Field) MaskTL2Bit() *int
- func (f Field) Name() string
- func (f Field) NatArgs() []ActualNatArg
- func (f Field) OwnerTypeInstance() TypeInstance
- func (f Field) TypeInstance() TypeInstance
- type Kernel
- func (k *Kernel) AddFileTL1(file string) error
- func (k *Kernel) AddFileTL2(file string) error
- func (k *Kernel) AllAnnotations() []string
- func (k *Kernel) AllTypeInstances() []TypeInstance
- func (k *Kernel) Compile() error
- func (k *Kernel) CompileBoolTL1(tlType []*tlast.Combinator) error
- func (k *Kernel) CompileBuiltinTL1(typ *tlast.Combinator) error
- func (k *Kernel) CompileTL1(namespaceTL1SeeHere map[string]*tlast.ParseError) error
- func (k *Kernel) GetFunctionInstance(name tlast.TL2TypeName) *TypeInstanceStruct
- func (k *Kernel) GetInstance(tr tlast.TL2TypeRef) (TypeInstance, bool, error)
- func (k *Kernel) IsDictWrapper(kt *KernelType, resolvedType tlast.TL2TypeRef) (bool, tlast.TL2TypeArgument, tlast.TL2TypeRef, error)
- func (k *Kernel) IsTrueType(rt tlast.TypeRef) bool
- func (k *Kernel) IsTrueType2(rt tlast.TL2TypeRef) bool
- func (k *Kernel) Migration() error
- func (k *Kernel) MigrationArgument(migrateTips map[*KernelType]struct{}, tip *KernelType, ...) (tlast.TL2TypeArgument, bool, error)
- func (k *Kernel) MigrationCheckTL2FromTL1Argument(refErrList *migrationTL1RefsTL2Errors, tra tlast.ArithmeticOrType, ...) error
- func (k *Kernel) MigrationCheckTL2FromTL1Field(refErrList *migrationTL1RefsTL2Errors, fieldDef tlast.Field, ...) error
- func (k *Kernel) MigrationCheckTL2FromTL1Type(refErrList *migrationTL1RefsTL2Errors, tr tlast.TypeRef, ...) error
- func (k *Kernel) MigrationFields(bb *bytes.Buffer, migrateTips map[*KernelType]struct{}, tip *KernelType, ...) ([]tlast.TemplateArgument, error)
- func (k *Kernel) MigrationForTests() (string, error)
- func (k *Kernel) MigrationTemplateArguments(bb *bytes.Buffer, tip *KernelType, comb *tlast.Combinator) error
- func (k *Kernel) MigrationTypeRef(bb *bytes.Buffer, migrateTips map[*KernelType]struct{}, tip *KernelType, ...) error
- func (k *Kernel) MigrationTypeRefImpl(migrateTips map[*KernelType]struct{}, tip *KernelType, tr tlast.TL2TypeRef, ...) (tlast.TL2TypeRef, error)
- func (k *Kernel) PrintUnusedWarnings()
- func (k *Kernel) TL1() []*tlast.Combinator
- func (k *Kernel) TL2() []tlast.TL2Combinator
- func (k *Kernel) TopLevelTypeInstances() []TypeInstance
- func (k *Kernel) VariantNames(definition []*tlast.Combinator) ([]string, error)
- type KernelType
- func (t *KernelType) Annotations() []string
- func (t *KernelType) CanBeBare() bool
- func (t *KernelType) CanBeBoxed() bool
- func (t *KernelType) CanonicalName() tlast.TL2TypeName
- func (t *KernelType) CombinatorTexts() []string
- func (t *KernelType) HasAnnotation(a string) bool
- func (t *KernelType) HistoricalName() tlast.TL2TypeName
- func (t *KernelType) IsFunction() bool
- func (t *KernelType) OriginTL2() bool
- func (t *KernelType) TL1() []*tlast.Combinator
- type KernelTypeTarg
- type KernelValue
- type KernelValueAlias
- func (v *KernelValueAlias) Clone() KernelValue
- func (v *KernelValueAlias) CompareForMapKey(other KernelValue) int
- func (v *KernelValueAlias) Random(rg *rand.Rand)
- func (v *KernelValueAlias) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueAlias) Reset()
- func (v *KernelValueAlias) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueAlias) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueAlias) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueAlias) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueAlias) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueAlias) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueArray
- func (v *KernelValueArray) Clone() KernelValue
- func (v *KernelValueArray) CompareForMapKey(other KernelValue) int
- func (v *KernelValueArray) Random(rg *rand.Rand)
- func (v *KernelValueArray) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
- func (v *KernelValueArray) Reset()
- func (v *KernelValueArray) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueArray) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueArray) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueArray) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueArray) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueArray) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueArrayBit
- func (v *KernelValueArrayBit) Clone() KernelValue
- func (v *KernelValueArrayBit) CompareForMapKey(other KernelValue) int
- func (v *KernelValueArrayBit) Random(rg *rand.Rand)
- func (v *KernelValueArrayBit) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
- func (v *KernelValueArrayBit) Reset()
- func (v *KernelValueArrayBit) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueArrayBit) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueArrayBit) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueArrayBit) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueArrayBit) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueArrayBit) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueBit
- func (v *KernelValueBit) Clone() KernelValue
- func (v *KernelValueBit) CompareForMapKey(other KernelValue) int
- func (v *KernelValueBit) Random(rg *rand.Rand)
- func (v *KernelValueBit) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueBit) Reset()
- func (v *KernelValueBit) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueBit) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueBit) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueBit) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueBit) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueBit) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueBool
- func (v *KernelValueBool) Clone() KernelValue
- func (v *KernelValueBool) CompareForMapKey(other KernelValue) int
- func (v *KernelValueBool) Random(rg *rand.Rand)
- func (v *KernelValueBool) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueBool) Reset()
- func (v *KernelValueBool) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueBool) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueBool) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueBool) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueBool) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueBool) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueByte
- func (v *KernelValueByte) Clone() KernelValue
- func (v *KernelValueByte) CompareForMapKey(other KernelValue) int
- func (v *KernelValueByte) Random(rg *rand.Rand)
- func (v *KernelValueByte) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueByte) Reset()
- func (v *KernelValueByte) SetFromEditor(str string) error
- func (v *KernelValueByte) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueByte) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueByte) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueByte) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueByte) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueByte) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueDict
- func (v *KernelValueDict) Clone() KernelValue
- func (v *KernelValueDict) CompareForMapKey(other KernelValue) int
- func (v *KernelValueDict) Random(rg *rand.Rand)
- func (v *KernelValueDict) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
- func (v *KernelValueDict) Reset()
- func (v *KernelValueDict) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueDict) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueDict) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueDict) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueDict) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueDict) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueInt32
- func (v *KernelValueInt32) Clone() KernelValue
- func (v *KernelValueInt32) CompareForMapKey(other KernelValue) int
- func (v *KernelValueInt32) Random(rg *rand.Rand)
- func (v *KernelValueInt32) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueInt32) Reset()
- func (v *KernelValueInt32) SetFromEditor(str string) error
- func (v *KernelValueInt32) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueInt32) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueInt32) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueInt32) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueInt32) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueInt32) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueInt64
- func (v *KernelValueInt64) Clone() KernelValue
- func (v *KernelValueInt64) CompareForMapKey(other KernelValue) int
- func (v *KernelValueInt64) Random(rg *rand.Rand)
- func (v *KernelValueInt64) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueInt64) Reset()
- func (v *KernelValueInt64) SetFromEditor(str string) error
- func (v *KernelValueInt64) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueInt64) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueInt64) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueInt64) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueInt64) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueInt64) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValuePrimitive
- type KernelValueString
- func (v *KernelValueString) Clone() KernelValue
- func (v *KernelValueString) CompareForMapKey(other KernelValue) int
- func (v *KernelValueString) Random(rg *rand.Rand)
- func (v *KernelValueString) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueString) Reset()
- func (v *KernelValueString) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueString) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueString) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueString) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueString) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueString) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueStruct
- func (v *KernelValueStruct) Clone() KernelValue
- func (v *KernelValueStruct) CloneObject() KernelValueStruct
- func (v *KernelValueStruct) CompareForMapKey(other KernelValue) int
- func (v *KernelValueStruct) Random(rg *rand.Rand)
- func (v *KernelValueStruct) ReadFieldsTL2(block byte, currentR []byte, ctx *TL2Context) (err error)
- func (v *KernelValueStruct) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
- func (v *KernelValueStruct) Reset()
- func (v *KernelValueStruct) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueStruct) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueStruct) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueStruct) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueStruct) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueStruct) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueUint32
- func (v *KernelValueUint32) Clone() KernelValue
- func (v *KernelValueUint32) CompareForMapKey(other KernelValue) int
- func (v *KernelValueUint32) Random(rg *rand.Rand)
- func (v *KernelValueUint32) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueUint32) Reset()
- func (v *KernelValueUint32) SetFromEditor(str string) error
- func (v *KernelValueUint32) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueUint32) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueUint32) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueUint32) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueUint32) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueUint32) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueUint64
- func (v *KernelValueUint64) Clone() KernelValue
- func (v *KernelValueUint64) CompareForMapKey(other KernelValue) int
- func (v *KernelValueUint64) Random(rg *rand.Rand)
- func (v *KernelValueUint64) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
- func (v *KernelValueUint64) Reset()
- func (v *KernelValueUint64) SetFromEditor(str string) error
- func (v *KernelValueUint64) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueUint64) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueUint64) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueUint64) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueUint64) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueUint64) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type KernelValueUnion
- func (v *KernelValueUnion) Clone() KernelValue
- func (v *KernelValueUnion) CompareForMapKey(other KernelValue) int
- func (v *KernelValueUnion) Random(rg *rand.Rand)
- func (v *KernelValueUnion) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
- func (v *KernelValueUnion) Reset()
- func (v *KernelValueUnion) UIFixPath(side int, level int, model *UIModel) int
- func (v *KernelValueUnion) UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
- func (v *KernelValueUnion) UIStartEdit(level int, model *UIModel, createMode int)
- func (v *KernelValueUnion) UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
- func (v *KernelValueUnion) WriteJSON(w []byte, ctx *TL2Context) []byte
- func (v *KernelValueUnion) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
- type LocalArg
- type NameCollision
- type NatFieldUsage
- type OptionsKernel
- type TL2Context
- type TypeInstance
- type TypeInstanceAlias
- func (ins *TypeInstanceAlias) CreateValue() KernelValue
- func (ins *TypeInstanceAlias) FindCycle(c *cycleFinder)
- func (ins *TypeInstanceAlias) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
- func (ins *TypeInstanceAlias) GoodForMapKey() bool
- func (ins *TypeInstanceAlias) IsBit() bool
- func (ins *TypeInstanceAlias) SkipTL2(r []byte) ([]byte, error)
- type TypeInstanceArray
- func (ins *TypeInstanceArray) Count() uint32
- func (ins *TypeInstanceArray) CreateValue() KernelValue
- func (ins *TypeInstanceArray) DynamicSize() bool
- func (ins *TypeInstanceArray) Field() Field
- func (ins *TypeInstanceArray) FindCycle(c *cycleFinder)
- func (ins *TypeInstanceArray) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
- func (ins *TypeInstanceArray) IsTuple() bool
- func (ins *TypeInstanceArray) SkipTL2(r []byte) ([]byte, error)
- type TypeInstanceArrayBit
- type TypeInstanceCommon
- func (ins *TypeInstanceCommon) ArgNamespace() string
- func (ins *TypeInstanceCommon) BoxedOnly() bool
- func (ins *TypeInstanceCommon) CanonicalName() string
- func (ins *TypeInstanceCommon) CommentBefore() string
- func (ins *TypeInstanceCommon) CommentRight() string
- func (ins *TypeInstanceCommon) Common() *TypeInstanceCommon
- func (ins *TypeInstanceCommon) GoodForMapKey() bool
- func (ins *TypeInstanceCommon) HasTL2() bool
- func (ins *TypeInstanceCommon) IsBit() bool
- func (ins *TypeInstanceCommon) IsTopLevel() bool
- func (ins *TypeInstanceCommon) KernelType() *KernelType
- func (ins *TypeInstanceCommon) NatParams() []string
- func (ins *TypeInstanceCommon) OriginTL2() bool
- func (ins *TypeInstanceCommon) ResolvedType() tlast.TL2TypeRef
- func (ins *TypeInstanceCommon) TLName() tlast.TL2TypeName
- func (ins *TypeInstanceCommon) TLName2() tlast.TL2TypeName
- func (ins *TypeInstanceCommon) TLTag() uint32
- func (w *TypeInstanceCommon) TransformNatArgsToChild(natArgs []ActualNatArg, childNatArgs []ActualNatArg) []ActualNatArg
- type TypeInstanceDict
- func (ins *TypeInstanceDict) CreateValue() KernelValue
- func (ins *TypeInstanceDict) Field() Field
- func (ins *TypeInstanceDict) FieldType() *TypeInstanceStruct
- func (ins *TypeInstanceDict) FindCycle(c *cycleFinder)
- func (ins *TypeInstanceDict) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
- func (ins *TypeInstanceDict) SkipTL2(r []byte) ([]byte, error)
- type TypeInstancePrimitive
- func (ins *TypeInstancePrimitive) CreateValue() KernelValue
- func (ins *TypeInstancePrimitive) FindCycle(c *cycleFinder)
- func (ins *TypeInstancePrimitive) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
- func (ins *TypeInstancePrimitive) GoodForMapKey() bool
- func (ins *TypeInstancePrimitive) IsBit() bool
- func (ins *TypeInstancePrimitive) IsTL1Bool() (ok bool, falseTag uint32, trueTag uint32)
- func (ins *TypeInstancePrimitive) SkipTL2(r []byte) ([]byte, error)
- type TypeInstanceRef
- type TypeInstanceStruct
- func (ins *TypeInstanceStruct) CreateValue() KernelValue
- func (ins *TypeInstanceStruct) CreateValueObject() KernelValueStruct
- func (ins *TypeInstanceStruct) Fields() []Field
- func (ins *TypeInstanceStruct) FindCycle(c *cycleFinder)
- func (ins *TypeInstanceStruct) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
- func (ins *TypeInstanceStruct) GetNatFieldUsage(fieldIndex int, inStructFields bool, inReturnType bool) NatFieldUsage
- func (ins *TypeInstanceStruct) IsAlias() bool
- func (ins *TypeInstanceStruct) IsResultAlias() bool
- func (trw *TypeInstanceStruct) IsTypeDef() bool
- func (ins *TypeInstanceStruct) IsUnwrap() bool
- func (ins *TypeInstanceStruct) RPCPreferTL2() bool
- func (ins *TypeInstanceStruct) ReplaceUnwrapArgs(natArgs []string) []string
- func (ins *TypeInstanceStruct) ResultNatArgs() []ActualNatArg
- func (ins *TypeInstanceStruct) ResultType() TypeInstance
- func (ins *TypeInstanceStruct) SkipTL2(r []byte) ([]byte, error)
- type TypeInstanceUnion
- func (ins *TypeInstanceUnion) BoxedOnly() bool
- func (ins *TypeInstanceUnion) CreateValue() KernelValue
- func (ins *TypeInstanceUnion) ElementNatArgs() []ActualNatArg
- func (ins *TypeInstanceUnion) FindCycle(c *cycleFinder)
- func (ins *TypeInstanceUnion) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
- func (ins *TypeInstanceUnion) IsEnum() bool
- func (ins *TypeInstanceUnion) IsUnionMaybe() (isMaybe bool, elementField Field)
- func (ins *TypeInstanceUnion) SkipTL2(r []byte) ([]byte, error)
- func (ins *TypeInstanceUnion) VariantNames() []string
- func (ins *TypeInstanceUnion) VariantTypes() []*TypeInstanceStruct
- type UIBlinkMsg
- type UIEditor
- type UIEditorPrimitive
- func (e *UIEditorPrimitive) OnBackspace(model *UIModel)
- func (e *UIEditorPrimitive) OnEnter(model *UIModel)
- func (e *UIEditorPrimitive) OnEscape(model *UIModel)
- func (e *UIEditorPrimitive) OnRune(msg string, model *UIModel)
- func (e *UIEditorPrimitive) OnTab(model *UIModel, side int)
- func (e *UIEditorPrimitive) SetValue(v KernelValuePrimitive)
- func (e *UIEditorPrimitive) UIWrite(sb *strings.Builder, model *UIModel)
- func (e *UIEditorPrimitive) Value() KernelValue
- type UIEditorString
- func (e *UIEditorString) FinishOK()
- func (e *UIEditorString) OnBackspace(model *UIModel)
- func (e *UIEditorString) OnEnter(model *UIModel)
- func (e *UIEditorString) OnEscape(model *UIModel)
- func (e *UIEditorString) OnRune(msg string, model *UIModel)
- func (e *UIEditorString) OnTab(model *UIModel, side int)
- func (e *UIEditorString) SetValue(v *KernelValueString)
- func (e *UIEditorString) UIWrite(sb *strings.Builder, model *UIModel)
- func (e *UIEditorString) Value() KernelValue
- type UIEditorUnion
- func (e *UIEditorUnion) FinishOK()
- func (e *UIEditorUnion) OnBackspace(model *UIModel)
- func (e *UIEditorUnion) OnEnter(model *UIModel)
- func (e *UIEditorUnion) OnEscape(model *UIModel)
- func (e *UIEditorUnion) OnRune(msg string, model *UIModel)
- func (e *UIEditorUnion) OnTab(model *UIModel, side int)
- func (e *UIEditorUnion) SetValue(v *KernelValueUnion)
- func (e *UIEditorUnion) UIWrite(sb *strings.Builder, model *UIModel)
- func (e *UIEditorUnion) Value() KernelValue
- type UIModel
- type Whitelist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActualNatArg ¶
type ActualNatArg struct {
// contains filtered or unexported fields
}
func (*ActualNatArg) FieldIndex ¶
func (arg *ActualNatArg) FieldIndex() int
func (*ActualNatArg) IsField ¶ added in v1.2.35
func (arg *ActualNatArg) IsField() bool
func (*ActualNatArg) IsName ¶ added in v1.3.22
func (arg *ActualNatArg) IsName() bool
func (*ActualNatArg) IsNumber ¶ added in v1.2.35
func (arg *ActualNatArg) IsNumber() bool
func (*ActualNatArg) Name ¶ added in v1.2.35
func (arg *ActualNatArg) Name() string
func (*ActualNatArg) Number ¶
func (arg *ActualNatArg) Number() uint32
type ByteBuilder ¶
type ByteBuilder struct {
// contains filtered or unexported fields
}
func (*ByteBuilder) Buf ¶
func (b *ByteBuilder) Buf() []byte
func (*ByteBuilder) FinishSize ¶
func (b *ByteBuilder) FinishSize(firstUsedByte int, lastUsedByte int, optimizeEmpty bool)
func (*ByteBuilder) Len ¶
func (b *ByteBuilder) Len() int
func (*ByteBuilder) Print ¶
func (b *ByteBuilder) Print() string
func (*ByteBuilder) PrintLegend ¶
func (b *ByteBuilder) PrintLegend() string
func (*ByteBuilder) ReserveSpaceForSize ¶
func (b *ByteBuilder) ReserveSpaceForSize() int
func (*ByteBuilder) SetCursorFinish ¶
func (b *ByteBuilder) SetCursorFinish()
func (*ByteBuilder) SetCursorStart ¶
func (b *ByteBuilder) SetCursorStart()
func (*ByteBuilder) WriteElementCount ¶
func (b *ByteBuilder) WriteElementCount(v int)
func (*ByteBuilder) WriteFieldmask ¶
func (b *ByteBuilder) WriteFieldmask()
func (*ByteBuilder) WriteString ¶
func (b *ByteBuilder) WriteString(v string)
func (*ByteBuilder) WriteVariantIndex ¶
func (b *ByteBuilder) WriteVariantIndex(v int)
type ByteColor ¶
type ByteColor byte
const ByteColorElementCount ByteColor = 2
const ByteColorFieldMask ByteColor = 4
const ByteColorNormal ByteColor = 0
const ByteColorObjectSize ByteColor = 1
const ByteColorStringData ByteColor = 7
const ByteColorStringSize ByteColor = 6
const ByteColorVariantIndex ByteColor = 3
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func (Field) CommentBefore ¶ added in v1.3.0
func (Field) CommentRight ¶ added in v1.3.0
func (Field) FieldMask ¶ added in v1.2.35
func (f Field) FieldMask() *ActualNatArg
func (Field) MaskTL2Bit ¶ added in v1.2.35
we do not know if this object is used by some other TL2 object when we generate this, so we return nil if owner does not marked as one needing TL2
func (Field) NatArgs ¶ added in v1.2.35
func (f Field) NatArgs() []ActualNatArg
func (Field) OwnerTypeInstance ¶ added in v1.3.13
func (f Field) OwnerTypeInstance() TypeInstance
func (Field) TypeInstance ¶ added in v1.2.35
func (f Field) TypeInstance() TypeInstance
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
func (*Kernel) AddFileTL1 ¶
func (*Kernel) AddFileTL2 ¶
func (*Kernel) AllAnnotations ¶ added in v1.2.35
func (*Kernel) AllTypeInstances ¶
func (k *Kernel) AllTypeInstances() []TypeInstance
func (*Kernel) CompileBoolTL1 ¶ added in v1.2.35
func (k *Kernel) CompileBoolTL1(tlType []*tlast.Combinator) error
func (*Kernel) CompileBuiltinTL1 ¶ added in v1.2.35
func (k *Kernel) CompileBuiltinTL1(typ *tlast.Combinator) error
func (*Kernel) CompileTL1 ¶
func (k *Kernel) CompileTL1(namespaceTL1SeeHere map[string]*tlast.ParseError) error
func (*Kernel) GetFunctionInstance ¶
func (k *Kernel) GetFunctionInstance(name tlast.TL2TypeName) *TypeInstanceStruct
TODO - remove or fix
func (*Kernel) GetInstance ¶ added in v1.2.35
func (k *Kernel) GetInstance(tr tlast.TL2TypeRef) (TypeInstance, bool, error)
we do not allow creating additional instances externally for now we identify types by TL2TypeRefs/TL2TypeNames, TL1 types are first converted into TL2 style
func (*Kernel) IsDictWrapper ¶ added in v1.3.19
func (k *Kernel) IsDictWrapper(kt *KernelType, resolvedType tlast.TL2TypeRef) (bool, tlast.TL2TypeArgument, tlast.TL2TypeRef, error)
func (*Kernel) IsTrueType2 ¶ added in v1.3.19
func (k *Kernel) IsTrueType2(rt tlast.TL2TypeRef) bool
func (*Kernel) Migration ¶ added in v1.2.35
Overwrites all files given to kernel. For each dir/file.tl containing combinator in a whitelist, if dir/file.tl2 does not exist, it is created. Then combinator is moved (with conversion) from dir/file.tl into dir/file.tl2 Original file is left, even if it is empty, because user might wish to move remaining comments to the new file.
func (*Kernel) MigrationArgument ¶ added in v1.2.35
func (k *Kernel) MigrationArgument(migrateTips map[*KernelType]struct{}, tip *KernelType, tra tlast.TL2TypeArgument, leftArgs []tlast.TemplateArgument, allowRemoved bool) (tlast.TL2TypeArgument, bool, error)
func (*Kernel) MigrationCheckTL2FromTL1Argument ¶ added in v1.3.15
func (k *Kernel) MigrationCheckTL2FromTL1Argument(refErrList *migrationTL1RefsTL2Errors, tra tlast.ArithmeticOrType, migrateTips map[*KernelType]struct{}, comb *tlast.Combinator, leftArgs []tlast.TemplateArgument) error
func (*Kernel) MigrationCheckTL2FromTL1Field ¶ added in v1.3.15
func (k *Kernel) MigrationCheckTL2FromTL1Field(refErrList *migrationTL1RefsTL2Errors, fieldDef tlast.Field, migrateTips map[*KernelType]struct{}, comb *tlast.Combinator, leftArgs []tlast.TemplateArgument) error
func (*Kernel) MigrationCheckTL2FromTL1Type ¶ added in v1.3.15
func (k *Kernel) MigrationCheckTL2FromTL1Type(refErrList *migrationTL1RefsTL2Errors, tr tlast.TypeRef, migrateTips map[*KernelType]struct{}, comb *tlast.Combinator, leftArgs []tlast.TemplateArgument) error
func (*Kernel) MigrationFields ¶ added in v1.2.35
func (k *Kernel) MigrationFields(bb *bytes.Buffer, migrateTips map[*KernelType]struct{}, tip *KernelType, comb *tlast.Combinator, fieldsAfterReplace []tlast.Field, typesAfterReplace []tlast.TL2TypeRef, indent bool) ([]tlast.TemplateArgument, error)
func (*Kernel) MigrationForTests ¶ added in v1.2.35
migrate and format all files into single deterministic string
func (*Kernel) MigrationTemplateArguments ¶ added in v1.2.35
func (k *Kernel) MigrationTemplateArguments(bb *bytes.Buffer, tip *KernelType, comb *tlast.Combinator) error
func (*Kernel) MigrationTypeRef ¶ added in v1.2.35
func (k *Kernel) MigrationTypeRef(bb *bytes.Buffer, migrateTips map[*KernelType]struct{}, tip *KernelType, comb *tlast.Combinator, tr tlast.TL2TypeRef, leftArgs []tlast.TemplateArgument) error
func (*Kernel) MigrationTypeRefImpl ¶ added in v1.2.35
func (k *Kernel) MigrationTypeRefImpl(migrateTips map[*KernelType]struct{}, tip *KernelType, tr tlast.TL2TypeRef, leftArgs []tlast.TemplateArgument) (tlast.TL2TypeRef, error)
func (*Kernel) PrintUnusedWarnings ¶ added in v1.3.22
func (k *Kernel) PrintUnusedWarnings()
func (*Kernel) TL1 ¶
func (k *Kernel) TL1() []*tlast.Combinator
func (*Kernel) TL2 ¶
func (k *Kernel) TL2() []tlast.TL2Combinator
func (*Kernel) TopLevelTypeInstances ¶ added in v1.3.0
func (k *Kernel) TopLevelTypeInstances() []TypeInstance
func (*Kernel) VariantNames ¶ added in v1.2.35
func (k *Kernel) VariantNames(definition []*tlast.Combinator) ([]string, error)
type KernelType ¶
type KernelType struct {
// contains filtered or unexported fields
}
func (*KernelType) Annotations ¶ added in v1.2.36
func (t *KernelType) Annotations() []string
func (*KernelType) CanBeBare ¶ added in v1.2.35
func (t *KernelType) CanBeBare() bool
func (*KernelType) CanBeBoxed ¶ added in v1.2.35
func (t *KernelType) CanBeBoxed() bool
func (*KernelType) CanonicalName ¶ added in v1.2.35
func (t *KernelType) CanonicalName() tlast.TL2TypeName
func (*KernelType) CombinatorTexts ¶ added in v1.3.0
func (t *KernelType) CombinatorTexts() []string
func (*KernelType) HasAnnotation ¶ added in v1.2.36
func (t *KernelType) HasAnnotation(a string) bool
func (*KernelType) HistoricalName ¶ added in v1.2.36
func (t *KernelType) HistoricalName() tlast.TL2TypeName
func (*KernelType) IsFunction ¶ added in v1.2.35
func (t *KernelType) IsFunction() bool
func (*KernelType) OriginTL2 ¶ added in v1.2.35
func (t *KernelType) OriginTL2() bool
func (*KernelType) TL1 ¶ added in v1.2.35
func (t *KernelType) TL1() []*tlast.Combinator
We do not want to give generators access to combinators directly. We want every piece of information to come through strict pure public interface.
type KernelTypeTarg ¶ added in v1.2.35
type KernelTypeTarg struct {
// contains filtered or unexported fields
}
type KernelValue ¶
type KernelValue interface {
Clone() KernelValue
Reset()
Random(rg *rand.Rand)
WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
WriteJSON(w []byte, ctx *TL2Context) []byte
UIWrite(sb *strings.Builder, onPath bool, level int, model *UIModel)
UIFixPath(side int, level int, model *UIModel) int // always called onPath
UIStartEdit(level int, model *UIModel, createMode int)
UIKey(level int, model *UIModel, insert bool, delete bool, up bool, down bool)
CompareForMapKey(other KernelValue) int
}
type KernelValueAlias ¶
type KernelValueAlias struct {
// contains filtered or unexported fields
}
func (*KernelValueAlias) Clone ¶
func (v *KernelValueAlias) Clone() KernelValue
func (*KernelValueAlias) CompareForMapKey ¶
func (v *KernelValueAlias) CompareForMapKey(other KernelValue) int
func (*KernelValueAlias) Random ¶
func (v *KernelValueAlias) Random(rg *rand.Rand)
func (*KernelValueAlias) ReadTL2 ¶
func (v *KernelValueAlias) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueAlias) Reset ¶
func (v *KernelValueAlias) Reset()
func (*KernelValueAlias) UIFixPath ¶
func (v *KernelValueAlias) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueAlias) UIStartEdit ¶
func (v *KernelValueAlias) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueAlias) WriteJSON ¶
func (v *KernelValueAlias) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueAlias) WriteTL2 ¶
func (v *KernelValueAlias) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueArray ¶
type KernelValueArray struct {
// contains filtered or unexported fields
}
func (*KernelValueArray) Clone ¶
func (v *KernelValueArray) Clone() KernelValue
func (*KernelValueArray) CompareForMapKey ¶
func (v *KernelValueArray) CompareForMapKey(other KernelValue) int
func (*KernelValueArray) Random ¶
func (v *KernelValueArray) Random(rg *rand.Rand)
func (*KernelValueArray) ReadTL2 ¶
func (v *KernelValueArray) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
func (*KernelValueArray) Reset ¶
func (v *KernelValueArray) Reset()
func (*KernelValueArray) UIFixPath ¶
func (v *KernelValueArray) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueArray) UIStartEdit ¶
func (v *KernelValueArray) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueArray) WriteJSON ¶
func (v *KernelValueArray) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueArray) WriteTL2 ¶
func (v *KernelValueArray) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueArrayBit ¶
type KernelValueArrayBit struct {
// contains filtered or unexported fields
}
func (*KernelValueArrayBit) Clone ¶
func (v *KernelValueArrayBit) Clone() KernelValue
func (*KernelValueArrayBit) CompareForMapKey ¶
func (v *KernelValueArrayBit) CompareForMapKey(other KernelValue) int
func (*KernelValueArrayBit) Random ¶
func (v *KernelValueArrayBit) Random(rg *rand.Rand)
func (*KernelValueArrayBit) ReadTL2 ¶
func (v *KernelValueArrayBit) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
func (*KernelValueArrayBit) Reset ¶
func (v *KernelValueArrayBit) Reset()
func (*KernelValueArrayBit) UIFixPath ¶
func (v *KernelValueArrayBit) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueArrayBit) UIStartEdit ¶
func (v *KernelValueArrayBit) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueArrayBit) WriteJSON ¶
func (v *KernelValueArrayBit) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueArrayBit) WriteTL2 ¶
func (v *KernelValueArrayBit) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueBit ¶
type KernelValueBit struct {
}
func (*KernelValueBit) Clone ¶
func (v *KernelValueBit) Clone() KernelValue
func (*KernelValueBit) CompareForMapKey ¶
func (v *KernelValueBit) CompareForMapKey(other KernelValue) int
func (*KernelValueBit) Random ¶
func (v *KernelValueBit) Random(rg *rand.Rand)
func (*KernelValueBit) ReadTL2 ¶
func (v *KernelValueBit) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueBit) Reset ¶
func (v *KernelValueBit) Reset()
func (*KernelValueBit) UIFixPath ¶
func (v *KernelValueBit) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueBit) UIStartEdit ¶
func (v *KernelValueBit) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueBit) WriteJSON ¶
func (v *KernelValueBit) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueBit) WriteTL2 ¶
func (v *KernelValueBit) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueBool ¶
type KernelValueBool struct {
// contains filtered or unexported fields
}
func (*KernelValueBool) Clone ¶
func (v *KernelValueBool) Clone() KernelValue
func (*KernelValueBool) CompareForMapKey ¶
func (v *KernelValueBool) CompareForMapKey(other KernelValue) int
func (*KernelValueBool) Random ¶
func (v *KernelValueBool) Random(rg *rand.Rand)
func (*KernelValueBool) ReadTL2 ¶
func (v *KernelValueBool) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueBool) Reset ¶
func (v *KernelValueBool) Reset()
func (*KernelValueBool) UIFixPath ¶
func (v *KernelValueBool) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueBool) UIStartEdit ¶
func (v *KernelValueBool) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueBool) WriteJSON ¶
func (v *KernelValueBool) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueBool) WriteTL2 ¶
func (v *KernelValueBool) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueByte ¶
type KernelValueByte struct {
// contains filtered or unexported fields
}
func (*KernelValueByte) Clone ¶
func (v *KernelValueByte) Clone() KernelValue
func (*KernelValueByte) CompareForMapKey ¶
func (v *KernelValueByte) CompareForMapKey(other KernelValue) int
func (*KernelValueByte) Random ¶
func (v *KernelValueByte) Random(rg *rand.Rand)
func (*KernelValueByte) ReadTL2 ¶
func (v *KernelValueByte) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueByte) Reset ¶
func (v *KernelValueByte) Reset()
func (*KernelValueByte) SetFromEditor ¶
func (v *KernelValueByte) SetFromEditor(str string) error
func (*KernelValueByte) UIFixPath ¶
func (v *KernelValueByte) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueByte) UIStartEdit ¶
func (v *KernelValueByte) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueByte) WriteJSON ¶
func (v *KernelValueByte) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueByte) WriteTL2 ¶
func (v *KernelValueByte) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueDict ¶
type KernelValueDict struct {
// contains filtered or unexported fields
}
func (*KernelValueDict) Clone ¶
func (v *KernelValueDict) Clone() KernelValue
func (*KernelValueDict) CompareForMapKey ¶
func (v *KernelValueDict) CompareForMapKey(other KernelValue) int
func (*KernelValueDict) Random ¶
func (v *KernelValueDict) Random(rg *rand.Rand)
func (*KernelValueDict) ReadTL2 ¶
func (v *KernelValueDict) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
func (*KernelValueDict) Reset ¶
func (v *KernelValueDict) Reset()
func (*KernelValueDict) UIFixPath ¶
func (v *KernelValueDict) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueDict) UIStartEdit ¶
func (v *KernelValueDict) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueDict) WriteJSON ¶
func (v *KernelValueDict) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueDict) WriteTL2 ¶
func (v *KernelValueDict) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueInt32 ¶
type KernelValueInt32 struct {
// contains filtered or unexported fields
}
func (*KernelValueInt32) Clone ¶
func (v *KernelValueInt32) Clone() KernelValue
func (*KernelValueInt32) CompareForMapKey ¶
func (v *KernelValueInt32) CompareForMapKey(other KernelValue) int
func (*KernelValueInt32) Random ¶
func (v *KernelValueInt32) Random(rg *rand.Rand)
func (*KernelValueInt32) ReadTL2 ¶
func (v *KernelValueInt32) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueInt32) Reset ¶
func (v *KernelValueInt32) Reset()
func (*KernelValueInt32) SetFromEditor ¶
func (v *KernelValueInt32) SetFromEditor(str string) error
func (*KernelValueInt32) UIFixPath ¶
func (v *KernelValueInt32) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueInt32) UIStartEdit ¶
func (v *KernelValueInt32) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueInt32) WriteJSON ¶
func (v *KernelValueInt32) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueInt32) WriteTL2 ¶
func (v *KernelValueInt32) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueInt64 ¶
type KernelValueInt64 struct {
// contains filtered or unexported fields
}
func (*KernelValueInt64) Clone ¶
func (v *KernelValueInt64) Clone() KernelValue
func (*KernelValueInt64) CompareForMapKey ¶
func (v *KernelValueInt64) CompareForMapKey(other KernelValue) int
func (*KernelValueInt64) Random ¶
func (v *KernelValueInt64) Random(rg *rand.Rand)
func (*KernelValueInt64) ReadTL2 ¶
func (v *KernelValueInt64) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueInt64) Reset ¶
func (v *KernelValueInt64) Reset()
func (*KernelValueInt64) SetFromEditor ¶
func (v *KernelValueInt64) SetFromEditor(str string) error
func (*KernelValueInt64) UIFixPath ¶
func (v *KernelValueInt64) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueInt64) UIStartEdit ¶
func (v *KernelValueInt64) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueInt64) WriteJSON ¶
func (v *KernelValueInt64) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueInt64) WriteTL2 ¶
func (v *KernelValueInt64) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValuePrimitive ¶
type KernelValuePrimitive interface {
KernelValue
SetFromEditor(str string) error
}
type KernelValueString ¶
type KernelValueString struct {
// contains filtered or unexported fields
}
func (*KernelValueString) Clone ¶
func (v *KernelValueString) Clone() KernelValue
func (*KernelValueString) CompareForMapKey ¶
func (v *KernelValueString) CompareForMapKey(other KernelValue) int
func (*KernelValueString) Random ¶
func (v *KernelValueString) Random(rg *rand.Rand)
func (*KernelValueString) ReadTL2 ¶
func (v *KernelValueString) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueString) Reset ¶
func (v *KernelValueString) Reset()
func (*KernelValueString) UIFixPath ¶
func (v *KernelValueString) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueString) UIStartEdit ¶
func (v *KernelValueString) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueString) WriteJSON ¶
func (v *KernelValueString) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueString) WriteTL2 ¶
func (v *KernelValueString) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueStruct ¶
type KernelValueStruct struct {
// contains filtered or unexported fields
}
func (*KernelValueStruct) Clone ¶
func (v *KernelValueStruct) Clone() KernelValue
func (*KernelValueStruct) CloneObject ¶
func (v *KernelValueStruct) CloneObject() KernelValueStruct
func (*KernelValueStruct) CompareForMapKey ¶
func (v *KernelValueStruct) CompareForMapKey(other KernelValue) int
func (*KernelValueStruct) Random ¶
func (v *KernelValueStruct) Random(rg *rand.Rand)
func (*KernelValueStruct) ReadFieldsTL2 ¶
func (v *KernelValueStruct) ReadFieldsTL2(block byte, currentR []byte, ctx *TL2Context) (err error)
func (*KernelValueStruct) ReadTL2 ¶
func (v *KernelValueStruct) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
func (*KernelValueStruct) Reset ¶
func (v *KernelValueStruct) Reset()
func (*KernelValueStruct) UIFixPath ¶
func (v *KernelValueStruct) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueStruct) UIStartEdit ¶
func (v *KernelValueStruct) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueStruct) WriteJSON ¶
func (v *KernelValueStruct) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueStruct) WriteTL2 ¶
func (v *KernelValueStruct) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueUint32 ¶
type KernelValueUint32 struct {
// contains filtered or unexported fields
}
func (*KernelValueUint32) Clone ¶
func (v *KernelValueUint32) Clone() KernelValue
func (*KernelValueUint32) CompareForMapKey ¶
func (v *KernelValueUint32) CompareForMapKey(other KernelValue) int
func (*KernelValueUint32) Random ¶
func (v *KernelValueUint32) Random(rg *rand.Rand)
func (*KernelValueUint32) ReadTL2 ¶
func (v *KernelValueUint32) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueUint32) Reset ¶
func (v *KernelValueUint32) Reset()
func (*KernelValueUint32) SetFromEditor ¶
func (v *KernelValueUint32) SetFromEditor(str string) error
func (*KernelValueUint32) UIFixPath ¶
func (v *KernelValueUint32) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueUint32) UIStartEdit ¶
func (v *KernelValueUint32) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueUint32) WriteJSON ¶
func (v *KernelValueUint32) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueUint32) WriteTL2 ¶
func (v *KernelValueUint32) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueUint64 ¶
type KernelValueUint64 struct {
// contains filtered or unexported fields
}
func (*KernelValueUint64) Clone ¶
func (v *KernelValueUint64) Clone() KernelValue
func (*KernelValueUint64) CompareForMapKey ¶
func (v *KernelValueUint64) CompareForMapKey(other KernelValue) int
func (*KernelValueUint64) Random ¶
func (v *KernelValueUint64) Random(rg *rand.Rand)
func (*KernelValueUint64) ReadTL2 ¶
func (v *KernelValueUint64) ReadTL2(r []byte, ctx *TL2Context) ([]byte, error)
func (*KernelValueUint64) Reset ¶
func (v *KernelValueUint64) Reset()
func (*KernelValueUint64) SetFromEditor ¶
func (v *KernelValueUint64) SetFromEditor(str string) error
func (*KernelValueUint64) UIFixPath ¶
func (v *KernelValueUint64) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueUint64) UIStartEdit ¶
func (v *KernelValueUint64) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueUint64) WriteJSON ¶
func (v *KernelValueUint64) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueUint64) WriteTL2 ¶
func (v *KernelValueUint64) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type KernelValueUnion ¶
type KernelValueUnion struct {
// contains filtered or unexported fields
}
func (*KernelValueUnion) Clone ¶
func (v *KernelValueUnion) Clone() KernelValue
func (*KernelValueUnion) CompareForMapKey ¶
func (v *KernelValueUnion) CompareForMapKey(other KernelValue) int
func (*KernelValueUnion) Random ¶
func (v *KernelValueUnion) Random(rg *rand.Rand)
func (*KernelValueUnion) ReadTL2 ¶
func (v *KernelValueUnion) ReadTL2(r []byte, ctx *TL2Context) (_ []byte, err error)
func (*KernelValueUnion) Reset ¶
func (v *KernelValueUnion) Reset()
func (*KernelValueUnion) UIFixPath ¶
func (v *KernelValueUnion) UIFixPath(side int, level int, model *UIModel) int
func (*KernelValueUnion) UIStartEdit ¶
func (v *KernelValueUnion) UIStartEdit(level int, model *UIModel, createMode int)
func (*KernelValueUnion) WriteJSON ¶
func (v *KernelValueUnion) WriteJSON(w []byte, ctx *TL2Context) []byte
func (*KernelValueUnion) WriteTL2 ¶
func (v *KernelValueUnion) WriteTL2(w *ByteBuilder, optimizeEmpty bool, onPath bool, level int, model *UIModel)
type NameCollision ¶ added in v1.2.35
type NameCollision struct {
// contains filtered or unexported fields
}
func (*NameCollision) AddSameCaseName ¶ added in v1.2.35
func (c *NameCollision) AddSameCaseName(name string, pr tlast.PositionRange, reason string) error
func (*NameCollision) AddUniqueName ¶ added in v1.2.35
func (c *NameCollision) AddUniqueName(name string, pr tlast.PositionRange, reason string) error
func (*NameCollision) NormalizeName ¶ added in v1.2.35
func (c *NameCollision) NormalizeName(s string) string
func (*NameCollision) ResetNormalized ¶ added in v1.2.35
func (c *NameCollision) ResetNormalized()
allows normalized checks between template arguments and fields, but strict checks between them
type NatFieldUsage ¶ added in v1.3.22
type NatFieldUsage struct {
UsedAsMask bool
UsedAsSize bool
AffectedFields [32]map[*TypeInstanceStruct][]int // bit->type->fieldIndexes
// contains filtered or unexported fields
}
func (*NatFieldUsage) UsedBits ¶ added in v1.3.22
func (f *NatFieldUsage) UsedBits() []uint32
type OptionsKernel ¶
type OptionsKernel struct {
WarningsAreErrors bool
Verbose bool
TypesWhiteList string
TL2WhiteList string // if !empty, will generate also TL2 factory, meta, etc.
RPCPreferTL2WhiteList string // RPC client code will prefer to send requests in TL2 format
ErrorWriter io.Writer // all Errors and warnings should be redirected to this io.Writer, by default it is os.Stderr
// TODO - remove after migration code stabilized
TL2MigrationDevMode bool
// TODO - quickly adapt new rules, remove these options
NewBrackets bool // TODO - implement new brackets
}
func (*OptionsKernel) Bind ¶
func (opt *OptionsKernel) Bind(f *flag.FlagSet)
type TypeInstance ¶
type TypeInstance interface {
CanonicalName() string
KernelType() *KernelType
Common() *TypeInstanceCommon
GoodForMapKey() bool
IsBit() bool // for vector/tuple special case
FindCycle(c *cycleFinder)
GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
BoxedOnly() bool
CreateValue() KernelValue
SkipTL2(r []byte) ([]byte, error)
}
type TypeInstanceAlias ¶
type TypeInstanceAlias struct {
TypeInstanceCommon
// contains filtered or unexported fields
}
func (*TypeInstanceAlias) CreateValue ¶
func (ins *TypeInstanceAlias) CreateValue() KernelValue
func (*TypeInstanceAlias) FindCycle ¶
func (ins *TypeInstanceAlias) FindCycle(c *cycleFinder)
func (*TypeInstanceAlias) GetChildren ¶ added in v1.3.13
func (ins *TypeInstanceAlias) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
func (*TypeInstanceAlias) GoodForMapKey ¶
func (ins *TypeInstanceAlias) GoodForMapKey() bool
func (*TypeInstanceAlias) IsBit ¶
func (ins *TypeInstanceAlias) IsBit() bool
type TypeInstanceArray ¶
type TypeInstanceArray struct {
TypeInstanceCommon
// contains filtered or unexported fields
}
func (*TypeInstanceArray) Count ¶ added in v1.2.35
func (ins *TypeInstanceArray) Count() uint32
func (*TypeInstanceArray) CreateValue ¶
func (ins *TypeInstanceArray) CreateValue() KernelValue
func (*TypeInstanceArray) DynamicSize ¶ added in v1.2.35
func (ins *TypeInstanceArray) DynamicSize() bool
func (*TypeInstanceArray) Field ¶ added in v1.3.13
func (ins *TypeInstanceArray) Field() Field
func (*TypeInstanceArray) FindCycle ¶
func (ins *TypeInstanceArray) FindCycle(c *cycleFinder)
func (*TypeInstanceArray) GetChildren ¶ added in v1.3.13
func (ins *TypeInstanceArray) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
func (*TypeInstanceArray) IsTuple ¶ added in v1.2.35
func (ins *TypeInstanceArray) IsTuple() bool
type TypeInstanceArrayBit ¶
type TypeInstanceArrayBit struct {
TypeInstanceCommon
// contains filtered or unexported fields
}
func (*TypeInstanceArrayBit) CreateValue ¶
func (ins *TypeInstanceArrayBit) CreateValue() KernelValue
func (*TypeInstanceArrayBit) FindCycle ¶
func (ins *TypeInstanceArrayBit) FindCycle(c *cycleFinder)
func (*TypeInstanceArrayBit) GetChildren ¶ added in v1.3.13
func (ins *TypeInstanceArrayBit) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
type TypeInstanceCommon ¶
type TypeInstanceCommon struct {
// contains filtered or unexported fields
}
func (*TypeInstanceCommon) ArgNamespace ¶ added in v1.2.35
func (ins *TypeInstanceCommon) ArgNamespace() string
func (*TypeInstanceCommon) BoxedOnly ¶ added in v1.2.35
func (ins *TypeInstanceCommon) BoxedOnly() bool
func (*TypeInstanceCommon) CanonicalName ¶
func (ins *TypeInstanceCommon) CanonicalName() string
func (*TypeInstanceCommon) CommentBefore ¶ added in v1.3.21
func (ins *TypeInstanceCommon) CommentBefore() string
union has also comment per variant
func (*TypeInstanceCommon) CommentRight ¶ added in v1.3.21
func (ins *TypeInstanceCommon) CommentRight() string
func (*TypeInstanceCommon) Common ¶ added in v1.2.35
func (ins *TypeInstanceCommon) Common() *TypeInstanceCommon
func (*TypeInstanceCommon) GoodForMapKey ¶
func (ins *TypeInstanceCommon) GoodForMapKey() bool
func (*TypeInstanceCommon) HasTL2 ¶ added in v1.3.13
func (ins *TypeInstanceCommon) HasTL2() bool
func (*TypeInstanceCommon) IsBit ¶
func (ins *TypeInstanceCommon) IsBit() bool
func (*TypeInstanceCommon) IsTopLevel ¶ added in v1.2.36
func (ins *TypeInstanceCommon) IsTopLevel() bool
func (*TypeInstanceCommon) KernelType ¶ added in v1.2.35
func (ins *TypeInstanceCommon) KernelType() *KernelType
func (*TypeInstanceCommon) NatParams ¶
func (ins *TypeInstanceCommon) NatParams() []string
func (*TypeInstanceCommon) OriginTL2 ¶ added in v1.3.22
func (ins *TypeInstanceCommon) OriginTL2() bool
func (*TypeInstanceCommon) ResolvedType ¶ added in v1.2.35
func (ins *TypeInstanceCommon) ResolvedType() tlast.TL2TypeRef
func (*TypeInstanceCommon) TLName ¶ added in v1.2.36
func (ins *TypeInstanceCommon) TLName() tlast.TL2TypeName
func (*TypeInstanceCommon) TLName2 ¶ added in v1.3.15
func (ins *TypeInstanceCommon) TLName2() tlast.TL2TypeName
func (*TypeInstanceCommon) TLTag ¶ added in v1.2.36
func (ins *TypeInstanceCommon) TLTag() uint32
for TL1 union zero, for TL2 union as specified by user for TL1 union variant !zero, for TL2 union variant zero
func (*TypeInstanceCommon) TransformNatArgsToChild ¶ added in v1.3.0
func (w *TypeInstanceCommon) TransformNatArgsToChild(natArgs []ActualNatArg, childNatArgs []ActualNatArg) []ActualNatArg
same code as in func (ins *TypeInstanceStruct) ReplaceUnwrapArgs
type TypeInstanceDict ¶
type TypeInstanceDict struct {
TypeInstanceCommon
// contains filtered or unexported fields
}
func (*TypeInstanceDict) CreateValue ¶
func (ins *TypeInstanceDict) CreateValue() KernelValue
func (*TypeInstanceDict) Field ¶ added in v1.3.13
func (ins *TypeInstanceDict) Field() Field
func (*TypeInstanceDict) FieldType ¶ added in v1.2.35
func (ins *TypeInstanceDict) FieldType() *TypeInstanceStruct
func (*TypeInstanceDict) FindCycle ¶
func (ins *TypeInstanceDict) FindCycle(c *cycleFinder)
func (*TypeInstanceDict) GetChildren ¶ added in v1.3.13
func (ins *TypeInstanceDict) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
type TypeInstancePrimitive ¶
type TypeInstancePrimitive struct {
TypeInstanceCommon
// contains filtered or unexported fields
}
func (*TypeInstancePrimitive) CreateValue ¶
func (ins *TypeInstancePrimitive) CreateValue() KernelValue
func (*TypeInstancePrimitive) FindCycle ¶
func (ins *TypeInstancePrimitive) FindCycle(c *cycleFinder)
func (*TypeInstancePrimitive) GetChildren ¶ added in v1.3.13
func (ins *TypeInstancePrimitive) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
func (*TypeInstancePrimitive) GoodForMapKey ¶
func (ins *TypeInstancePrimitive) GoodForMapKey() bool
func (*TypeInstancePrimitive) IsBit ¶
func (ins *TypeInstancePrimitive) IsBit() bool
type TypeInstanceRef ¶
type TypeInstanceRef struct {
// contains filtered or unexported fields
}
during recursive type resolution, we store pointer to this type, later type instance is instantiated and ins is set
type TypeInstanceStruct ¶
type TypeInstanceStruct struct {
TypeInstanceCommon
// contains filtered or unexported fields
}
func (*TypeInstanceStruct) CreateValue ¶
func (ins *TypeInstanceStruct) CreateValue() KernelValue
func (*TypeInstanceStruct) CreateValueObject ¶
func (ins *TypeInstanceStruct) CreateValueObject() KernelValueStruct
func (*TypeInstanceStruct) Fields ¶ added in v1.2.35
func (ins *TypeInstanceStruct) Fields() []Field
func (*TypeInstanceStruct) FindCycle ¶
func (ins *TypeInstanceStruct) FindCycle(c *cycleFinder)
func (*TypeInstanceStruct) GetChildren ¶ added in v1.3.13
func (ins *TypeInstanceStruct) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
func (*TypeInstanceStruct) GetNatFieldUsage ¶ added in v1.3.22
func (ins *TypeInstanceStruct) GetNatFieldUsage(fieldIndex int, inStructFields bool, inReturnType bool) NatFieldUsage
func (*TypeInstanceStruct) IsAlias ¶ added in v1.3.22
func (ins *TypeInstanceStruct) IsAlias() bool
Both TL1-style typedef (single anonymous field) And actual TL2-style alias. In both cases, there is no TL2 object wrapping around the aliasing type So TL2 serialization format is the same. TL1 format will differ if the first field is Boxed.
func (*TypeInstanceStruct) IsResultAlias ¶ added in v1.3.14
func (ins *TypeInstanceStruct) IsResultAlias() bool
func (*TypeInstanceStruct) IsTypeDef ¶ added in v1.3.0
func (trw *TypeInstanceStruct) IsTypeDef() bool
most generators will need to add !recursive
func (*TypeInstanceStruct) IsUnwrap ¶ added in v1.2.36
func (ins *TypeInstanceStruct) IsUnwrap() bool
Where this type is used during generation, we must instad use wrapped type. vector<int> is compiled into []int.
func (*TypeInstanceStruct) RPCPreferTL2 ¶ added in v1.3.11
func (ins *TypeInstanceStruct) RPCPreferTL2() bool
func (*TypeInstanceStruct) ReplaceUnwrapArgs ¶ added in v1.3.0
func (ins *TypeInstanceStruct) ReplaceUnwrapArgs(natArgs []string) []string
same code as in func (w *TypeInstanceCommon) TransformNatArgsToChild
func (*TypeInstanceStruct) ResultNatArgs ¶ added in v1.2.35
func (ins *TypeInstanceStruct) ResultNatArgs() []ActualNatArg
func (*TypeInstanceStruct) ResultType ¶ added in v1.2.35
func (ins *TypeInstanceStruct) ResultType() TypeInstance
type TypeInstanceUnion ¶
type TypeInstanceUnion struct {
TypeInstanceCommon
// contains filtered or unexported fields
}
func (*TypeInstanceUnion) BoxedOnly ¶ added in v1.2.35
func (ins *TypeInstanceUnion) BoxedOnly() bool
func (*TypeInstanceUnion) CreateValue ¶
func (ins *TypeInstanceUnion) CreateValue() KernelValue
func (*TypeInstanceUnion) ElementNatArgs ¶ added in v1.2.35
func (ins *TypeInstanceUnion) ElementNatArgs() []ActualNatArg
func (*TypeInstanceUnion) FindCycle ¶
func (ins *TypeInstanceUnion) FindCycle(c *cycleFinder)
func (*TypeInstanceUnion) GetChildren ¶ added in v1.3.13
func (ins *TypeInstanceUnion) GetChildren(children []TypeInstance, withReturnType bool) []TypeInstance
func (*TypeInstanceUnion) IsEnum ¶ added in v1.2.35
func (ins *TypeInstanceUnion) IsEnum() bool
func (*TypeInstanceUnion) IsUnionMaybe ¶ added in v1.2.36
func (ins *TypeInstanceUnion) IsUnionMaybe() (isMaybe bool, elementField Field)
This is hint to generators
func (*TypeInstanceUnion) VariantNames ¶ added in v1.2.35
func (ins *TypeInstanceUnion) VariantNames() []string
func (*TypeInstanceUnion) VariantTypes ¶ added in v1.2.35
func (ins *TypeInstanceUnion) VariantTypes() []*TypeInstanceStruct
type UIBlinkMsg ¶
type UIBlinkMsg struct {
On bool
}
type UIEditorPrimitive ¶
type UIEditorPrimitive struct {
// contains filtered or unexported fields
}
func (*UIEditorPrimitive) OnBackspace ¶
func (e *UIEditorPrimitive) OnBackspace(model *UIModel)
func (*UIEditorPrimitive) OnEnter ¶
func (e *UIEditorPrimitive) OnEnter(model *UIModel)
func (*UIEditorPrimitive) OnEscape ¶
func (e *UIEditorPrimitive) OnEscape(model *UIModel)
func (*UIEditorPrimitive) OnRune ¶
func (e *UIEditorPrimitive) OnRune(msg string, model *UIModel)
func (*UIEditorPrimitive) OnTab ¶
func (e *UIEditorPrimitive) OnTab(model *UIModel, side int)
func (*UIEditorPrimitive) SetValue ¶
func (e *UIEditorPrimitive) SetValue(v KernelValuePrimitive)
func (*UIEditorPrimitive) UIWrite ¶
func (e *UIEditorPrimitive) UIWrite(sb *strings.Builder, model *UIModel)
func (*UIEditorPrimitive) Value ¶
func (e *UIEditorPrimitive) Value() KernelValue
type UIEditorString ¶
type UIEditorString struct {
// contains filtered or unexported fields
}
func (*UIEditorString) FinishOK ¶
func (e *UIEditorString) FinishOK()
func (*UIEditorString) OnBackspace ¶
func (e *UIEditorString) OnBackspace(model *UIModel)
func (*UIEditorString) OnEnter ¶
func (e *UIEditorString) OnEnter(model *UIModel)
func (*UIEditorString) OnEscape ¶
func (e *UIEditorString) OnEscape(model *UIModel)
func (*UIEditorString) OnRune ¶
func (e *UIEditorString) OnRune(msg string, model *UIModel)
func (*UIEditorString) OnTab ¶
func (e *UIEditorString) OnTab(model *UIModel, side int)
func (*UIEditorString) SetValue ¶
func (e *UIEditorString) SetValue(v *KernelValueString)
func (*UIEditorString) UIWrite ¶
func (e *UIEditorString) UIWrite(sb *strings.Builder, model *UIModel)
func (*UIEditorString) Value ¶
func (e *UIEditorString) Value() KernelValue
type UIEditorUnion ¶
type UIEditorUnion struct {
// contains filtered or unexported fields
}
func (*UIEditorUnion) FinishOK ¶
func (e *UIEditorUnion) FinishOK()
func (*UIEditorUnion) OnBackspace ¶
func (e *UIEditorUnion) OnBackspace(model *UIModel)
func (*UIEditorUnion) OnEnter ¶
func (e *UIEditorUnion) OnEnter(model *UIModel)
func (*UIEditorUnion) OnEscape ¶
func (e *UIEditorUnion) OnEscape(model *UIModel)
func (*UIEditorUnion) OnRune ¶
func (e *UIEditorUnion) OnRune(msg string, model *UIModel)
func (*UIEditorUnion) OnTab ¶
func (e *UIEditorUnion) OnTab(model *UIModel, side int)
func (*UIEditorUnion) SetValue ¶
func (e *UIEditorUnion) SetValue(v *KernelValueUnion)
func (*UIEditorUnion) UIWrite ¶
func (e *UIEditorUnion) UIWrite(sb *strings.Builder, model *UIModel)
func (*UIEditorUnion) Value ¶
func (e *UIEditorUnion) Value() KernelValue
type UIModel ¶
type UIModel struct {
Fun KernelValueStruct
Path []int // selected field on every hierarchy level, 0 means union constructor
Blink UIBlinkMsg
CurrentEditor UIEditor
LastError error
ShowLegend bool
EditorUnion UIEditorUnion
EditorString UIEditorString
EditorPrimitive UIEditorPrimitive
Width int
Height int
}
func (*UIModel) SetCurrentEditor ¶
type Whitelist ¶
type Whitelist struct {
// contains filtered or unexported fields
}
func NewWhiteList ¶
func (*Whitelist) HasName2 ¶ added in v1.3.19
func (w *Whitelist) HasName2(name tlast.TL2TypeName) bool
func (*Whitelist) UnusedWarning ¶ added in v1.3.22
Source Files
¶
- byte_builder.go
- conversion.go
- cycle.go
- field.go
- function.go
- kernel.go
- kernel_instantiate.go
- kernel_instantiate_tl1.go
- kernel_resolve.go
- kernel_tl1.go
- kernel_tl1_heuristics.go
- kernel_type.go
- kernel_type_check_tl1.go
- kernel_type_check_tl2.go
- kernel_value.go
- migration.go
- name_collision.go
- options.go
- t_alias.go
- t_alias_value.go
- t_array.go
- t_array_value.go
- t_arraybit.go
- t_arraybit_value.go
- t_dict.go
- t_dict_value.go
- t_primitive.go
- t_primitive_value.go
- t_string_value.go
- t_struct.go
- t_struct_affected_fields.go
- t_struct_value.go
- t_union.go
- t_union_value.go
- type_instance.go
- ui.go
- ui_editor_primitive.go
- ui_editor_string.go
- ui_editor_union.go
- whitelist.go