types

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VoidType   = PrimitiveTypeStruct{/* contains filtered or unexported fields */}
	IntType    = PrimitiveTypeStruct{/* contains filtered or unexported fields */}
	StringType = PrimitiveTypeStruct{/* contains filtered or unexported fields */}
	DoubleType = PrimitiveTypeStruct{/* contains filtered or unexported fields */}
	ErrorType  = PrimitiveTypeStruct{/* contains filtered or unexported fields */}
)

Functions

This section is empty.

Types

type ListTypeStruct

type ListTypeStruct struct {
	ValueType

	ContentType ValueType
}

func NewListType added in v0.0.14

func NewListType(contentType ValueType) ListTypeStruct

func (ListTypeStruct) Equals added in v0.0.14

func (l ListTypeStruct) Equals(other ValueType) bool

func (ListTypeStruct) Primitive

func (l ListTypeStruct) Primitive() ValueType

func (ListTypeStruct) ToNBT added in v0.0.14

func (l ListTypeStruct) ToNBT() nbt.Value

func (ListTypeStruct) ToString

func (l ListTypeStruct) ToString() string

type PrimitiveType added in v0.0.14

type PrimitiveType string
const (
	// PrimitiveErrorType  used for error handling
	PrimitiveErrorType PrimitiveType = "error"

	PrimitiveVoidType   PrimitiveType = "void"
	PrimitiveIntType    PrimitiveType = "int"
	PrimitiveStringType PrimitiveType = "str"
	PrimitiveDoubleType PrimitiveType = "double"
)

type PrimitiveTypeStruct

type PrimitiveTypeStruct struct {
	ValueType
	// contains filtered or unexported fields
}

func (PrimitiveTypeStruct) Equals added in v0.0.14

func (p PrimitiveTypeStruct) Equals(other ValueType) bool

func (PrimitiveTypeStruct) Primitive

func (p PrimitiveTypeStruct) Primitive() ValueType

func (PrimitiveTypeStruct) ToNBT added in v0.0.14

func (p PrimitiveTypeStruct) ToNBT() nbt.Value

func (PrimitiveTypeStruct) ToString

func (p PrimitiveTypeStruct) ToString() string

type StructTypeStruct

type StructTypeStruct struct {
	ValueType

	Name string
	// contains filtered or unexported fields
}

func NewStructType added in v0.0.14

func NewStructType(name string) StructTypeStruct

func (StructTypeStruct) Equals added in v0.0.14

func (s StructTypeStruct) Equals(other ValueType) bool

func (StructTypeStruct) GetField added in v0.0.14

func (s StructTypeStruct) GetField(name string) (ValueType, bool)

func (StructTypeStruct) GetFieldNames added in v0.0.14

func (s StructTypeStruct) GetFieldNames() []string

func (StructTypeStruct) Primitive

func (s StructTypeStruct) Primitive() ValueType

func (StructTypeStruct) SetField added in v0.0.14

func (s StructTypeStruct) SetField(name string, value ValueType)

func (StructTypeStruct) Size added in v0.0.14

func (s StructTypeStruct) Size() int

func (StructTypeStruct) ToNBT added in v0.0.14

func (s StructTypeStruct) ToNBT() nbt.Value

func (StructTypeStruct) ToString

func (s StructTypeStruct) ToString() string

type ValueType added in v0.0.14

type ValueType interface {
	Primitive() ValueType
	ToString() string
	ToNBT() nbt.Value
	Equals(other ValueType) bool
}

Jump to

Keyboard shortcuts

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