types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeInt        = 0
	CodeReal       = 1
	CodeBool       = 2
	CodeString     = 3
	CodeTime       = 4
	CodeDate       = 5
	CodeTimeseries = 6
	CodeEnum       = 7
	CodeClass      = 8
	CodeList       = 9
	CodeMap        = 10
	CodeError      = 11
	CodeToFindOut  = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolType

type BoolType struct {
}

func NewBoolType

func NewBoolType() *BoolType

func (BoolType) Code

func (BoolType) Code() int8

func (BoolType) String

func (BoolType) String() string

type ClassType

type ClassType struct {
	Properties []*Property
	Functions  []*Function
	Info       *parser.Info
	// contains filtered or unexported fields
}

func NewClassType

func NewClassType(name string, info *parser.Info) *ClassType

func (*ClassType) AddFunction

func (t *ClassType) AddFunction(f *Function)

func (*ClassType) AddProperty

func (t *ClassType) AddProperty(p *Property)

func (*ClassType) Code

func (t *ClassType) Code() int8

func (*ClassType) Id

func (t *ClassType) Id() string

func (*ClassType) InitScope

func (t *ClassType) InitScope(parent interfaces.Scope) *parser.ParseError

func (*ClassType) Kind

func (t *ClassType) Kind() interfaces.Kind

func (*ClassType) Scope

func (t *ClassType) Scope() interfaces.Scope

func (*ClassType) Specie

func (t *ClassType) Specie() interfaces.Specie

func (*ClassType) String

func (t *ClassType) String() string

type DateType

type DateType struct {
}

func NewDateType

func NewDateType() *DateType

func (DateType) Code

func (DateType) Code() int8

func (DateType) String

func (DateType) String() string

type EnumItem

type EnumItem struct {
	Code  int
	Value string
	// contains filtered or unexported fields
}

func NewEnumItem

func NewEnumItem(name string, code int, value string) *EnumItem

func (*EnumItem) Id

func (e *EnumItem) Id() string

func (*EnumItem) InitScope

func (e *EnumItem) InitScope(parent interfaces.Scope) *parser.ParseError

func (*EnumItem) Kind

func (e *EnumItem) Kind() interfaces.Kind

func (*EnumItem) Scope

func (e *EnumItem) Scope() interfaces.Scope

func (*EnumItem) Specie

func (e *EnumItem) Specie() interfaces.Specie

type EnumType

type EnumType struct {
	IsInt bool
	Items []*EnumItem
	Info  *parser.Info
	// contains filtered or unexported fields
}

func NewEnumType

func NewEnumType(name string, isInt bool, info *parser.Info) *EnumType

func (*EnumType) AddItem

func (e *EnumType) AddItem(i *EnumItem)

func (*EnumType) AssignCodes

func (e *EnumType) AssignCodes()

func (*EnumType) Code

func (e *EnumType) Code() int8

func (*EnumType) Id

func (e *EnumType) Id() string

func (*EnumType) InitScope

func (e *EnumType) InitScope(parent interfaces.Scope) *parser.ParseError

func (*EnumType) Kind

func (e *EnumType) Kind() interfaces.Kind

func (*EnumType) Scope

func (e *EnumType) Scope() interfaces.Scope

func (*EnumType) Size

func (e *EnumType) Size() int

func (*EnumType) Specie

func (e *EnumType) Specie() interfaces.Specie

func (*EnumType) String

func (e *EnumType) String() string

type ErrorType

type ErrorType struct {
}

func NewErrorType

func NewErrorType() *ErrorType

func (ErrorType) Code

func (ErrorType) Code() int8

func (ErrorType) String

func (ErrorType) String() string

type Function

type Function struct {
	Class   *data.FQIdentifier
	Params  []*Param
	Returns []Type
	Block   *data.Block
	Info    *parser.Info
	// contains filtered or unexported fields
}

func NewFunction

func NewFunction(name string, info *parser.Info) *Function

func (*Function) AddParam

func (f *Function) AddParam(p *Param)

func (*Function) AddReturnType

func (f *Function) AddReturnType(t Type)

func (*Function) Id

func (f *Function) Id() string

func (*Function) InitScope

func (f *Function) InitScope(parent interfaces.Scope) *parser.ParseError

func (*Function) Kind

func (f *Function) Kind() interfaces.Kind

func (*Function) Scope

func (f *Function) Scope() interfaces.Scope

func (*Function) SetEmbedder

func (f *Function) SetEmbedder(embedder interfaces.Symbol)

func (*Function) Specie

func (f *Function) Specie() interfaces.Specie

type IntType

type IntType struct {
}

func NewIntType

func NewIntType() *IntType

func (IntType) Code

func (IntType) Code() int8

func (IntType) String

func (IntType) String() string

type ListType

type ListType struct {
	SubType Type
}

func NewListType

func NewListType(t Type) *ListType

func (*ListType) Code

func (t *ListType) Code() int8

func (*ListType) String

func (t *ListType) String() string

type MapType

type MapType struct {
	KeyType   Type
	ValueType Type
}

func NewMapType

func NewMapType(keyType, valueType Type) *MapType

func (*MapType) Code

func (t *MapType) Code() int8

func (*MapType) String

func (t *MapType) String() string

type Param

type Param struct {
	Name string
	Type Type
	Info *parser.Info
}

func NewParam

func NewParam(name string, t Type, info *parser.Info) *Param

func (*Param) Id

func (p *Param) Id() string

func (*Param) InitScope

func (p *Param) InitScope(parent interfaces.Scope) *parser.ParseError

func (*Param) Kind

func (p *Param) Kind() interfaces.Kind

func (*Param) Scope

func (p *Param) Scope() interfaces.Scope

func (*Param) Specie

func (p *Param) Specie() interfaces.Specie

type Property

type Property struct {
	Type Type
	Info *parser.Info
	// contains filtered or unexported fields
}

func NewProperty

func NewProperty(name string, type_ Type, info *parser.Info) *Property

func (*Property) Id

func (p *Property) Id() string

func (*Property) InitScope

func (p *Property) InitScope(parent interfaces.Scope) *parser.ParseError

func (*Property) Kind

func (p *Property) Kind() interfaces.Kind

func (*Property) Scope

func (p *Property) Scope() interfaces.Scope

func (*Property) Specie

func (p *Property) Specie() interfaces.Specie

type RealType

type RealType struct {
}

func NewRealType

func NewRealType() *RealType

func (RealType) Code

func (RealType) Code() int8

func (RealType) String

func (RealType) String() string

type StringType

type StringType struct {
}

func NewStringType

func NewStringType() *StringType

func (StringType) Code

func (StringType) Code() int8

func (StringType) String

func (StringType) String() string

type TimeSeriesType

type TimeSeriesType struct {
	SubType Type
}

func NewTimeSeriesType

func NewTimeSeriesType(t Type) *TimeSeriesType

func (TimeSeriesType) Code

func (TimeSeriesType) Code() int8

func (TimeSeriesType) String

func (TimeSeriesType) String() string

type TimeType

type TimeType struct {
}

func NewTimeType

func NewTimeType() *TimeType

func (TimeType) Code

func (TimeType) Code() int8

func (TimeType) String

func (TimeType) String() string

type ToFindOutType

type ToFindOutType struct {
	Name *data.FQIdentifier
	Info *parser.Info
}

func NewToFindOutType

func NewToFindOutType(name *data.FQIdentifier, info *parser.Info) *ToFindOutType

func (*ToFindOutType) Code

func (t *ToFindOutType) Code() int8

func (*ToFindOutType) String

func (t *ToFindOutType) String() string

type Type

type Type interface {
	Code() int8
	String() string
}

func ConvertKeyType

func ConvertKeyType(tree parser.IKeyTypeContext) Type

func ConvertType

func ConvertType(tree parser.ITypeContext) Type

Jump to

Keyboard shortcuts

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