types

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT Imports: 0 Imported by: 9

Documentation

Index

Constants

View Source
const (
	Primitive = 1 << iota
	Collection
	Symbol
	Numeric
	Expression
)

Variables

View Source
var (
	TypeNilId, TypeNil                   = NewType("nil")
	TypeUnknownId, TypeUnknown           = NewType("nil")
	TypeStringId, TypeString             = NewTypeWithProperties("string", Primitive)
	TypeKeywordId, TypeKeyword           = NewTypeWithProperties("keyword", Symbol)
	TypeIntId, TypeInt                   = NewTypeWithProperties("integer", Primitive)
	TypeSymbolId, TypeSymbol             = NewTypeWithProperties("symbol", Symbol)
	TypeDictionaryId, TypeDictionary     = NewTypeWithProperties("dict", Collection)
	TypeVectorId, TypeVector             = NewTypeWithProperties("vector", Collection)
	TypeCharSequenceId, TypeCharSequence = NewTypeWithProperties("charseq", Primitive)
	TypeSexpressionId, TypeSexpression   = NewTypeWithProperties("sexp", Expression)
)

Functions

This section is empty.

Types

type LingoType

type LingoType uint8

type Type

type Type struct {
	// Name of the type
	Name string
	// Unique ID
	Id int
	// PropertyMask to store boolean properties
	PropertyMask int32
}

Function is a generic type interface

func NewType

func NewType(name string) (int, Type)

func NewTypeWithProperties

func NewTypeWithProperties(name string, propertyMask int32) (int, Type)

func (Type) HasProperty

func (t Type) HasProperty(property int32) bool

Jump to

Keyboard shortcuts

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