dectype

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgumentNeedsTypeIdInsertedBefore added in v0.0.4

func ArgumentNeedsTypeIdInsertedBefore(p dtype.Type) bool

func CalculateString

func CalculateString(ref *ast.ModuleReference) string

func CallType

func CallType(target dtype.Type, arguments []dtype.Type) (dtype.Type, error)

func CompatibleTypes

func CompatibleTypes(expectedType dtype.Type, actualType dtype.Type) error

func CompatibleTypesCheckCustomType added in v0.0.6

func CompatibleTypesCheckCustomType(expectedType dtype.Type, actualType dtype.Type) error

func GetMemorySizeAndAlignment added in v0.0.4

func GetMemorySizeAndAlignment(p dtype.Type) (MemorySize, MemoryAlign)

func GetMemorySizeAndAlignmentInternal added in v0.0.4

func GetMemorySizeAndAlignmentInternal(p dtype.Type) (MemorySize, MemoryAlign)

func HasAnyMatchingTypes added in v0.0.2

func HasAnyMatchingTypes(types []dtype.Type) (bool, int)

func IsAny added in v0.0.2

func IsAny(checkType dtype.Type) bool

func IsAnyOrFunctionWithAnyMatching added in v0.0.4

func IsAnyOrFunctionWithAnyMatching(p dtype.Type) bool

func IsAtomAny added in v0.0.2

func IsAtomAny(checkType dtype.Atom) bool

func IsIntLike added in v0.0.6

func IsIntLike(typeToCheck dtype.Type) bool

func IsListAny added in v0.0.4

func IsListAny(checkType dtype.Type) bool

func IsListLike added in v0.0.6

func IsListLike(typeToCheck dtype.Type) bool

func IsLocalType added in v0.0.5

func IsLocalType(checkType dtype.Type) bool

func IsTypeIdRef added in v0.0.4

func IsTypeIdRef(checkType dtype.Type) bool

func LocalTypesToArgumentNames added in v0.0.7

func LocalTypesToArgumentNames(types []dtype.Type) []*dtype.TypeArgumentName

func ReplaceTypeFromContext

func ReplaceTypeFromContext(originalTarget dtype.Type, lookup Lookup) (dtype.Type, error)

func TypeArgumentsToString

func TypeArgumentsToString(types []*dtype.TypeArgumentName) string

func TypeIsTemplateHasLocalTypes added in v0.0.6

func TypeIsTemplateHasLocalTypes(p dtype.Type) bool

func TypeParametersHumanReadableSuffix

func TypeParametersHumanReadableSuffix(types []dtype.Type) string

func TypeParametersSuffix

func TypeParametersSuffix(types []dtype.Type) string

func TypesIsTemplateHasLocalTypes added in v0.0.6

func TypesIsTemplateHasLocalTypes(p []dtype.Type) bool

func TypesToHumanReadable

func TypesToHumanReadable(types []dtype.Type) string

func TypesToString

func TypesToString(types []dtype.Type) string

func TypesToStringSuffix

func TypesToStringSuffix(types []dtype.Type) string

func UnReference added in v0.0.2

func UnReference(t dtype.Type) dtype.Type

func Unalias

func Unalias(t dtype.Type) dtype.Type

func UnaliasWithResolveInvoker

func UnaliasWithResolveInvoker(t dtype.Type) dtype.Type

Types

type Alias

type Alias struct {
	// contains filtered or unexported fields
}

func NewAliasType

func NewAliasType(name *ast.Alias, artifactTypeName ArtifactFullyQualifiedTypeName,
	referencedType dtype.Type) *Alias

func (*Alias) AddReferee added in v0.0.2

func (c *Alias) AddReferee(ref *AliasReference)

func (*Alias) ArtifactTypeName

func (u *Alias) ArtifactTypeName() ArtifactFullyQualifiedTypeName

func (*Alias) AstAlias

func (u *Alias) AstAlias() *ast.Alias

func (*Alias) FetchPositionLength

func (u *Alias) FetchPositionLength() token.SourceFileReference

func (*Alias) HumanReadable

func (u *Alias) HumanReadable() string

func (*Alias) MarkAsReferenced added in v0.0.2

func (c *Alias) MarkAsReferenced()

func (*Alias) Next

func (u *Alias) Next() dtype.Type

func (*Alias) ParameterCount

func (u *Alias) ParameterCount() int

func (*Alias) References added in v0.0.2

func (c *Alias) References() []*AliasReference

func (*Alias) Resolve

func (u *Alias) Resolve() (dtype.Atom, error)

func (*Alias) StatementString

func (u *Alias) StatementString() string

func (*Alias) String

func (u *Alias) String() string

func (*Alias) TypeIdentifier

func (u *Alias) TypeIdentifier() *ast.TypeIdentifier

func (*Alias) WasReferenced added in v0.0.2

func (c *Alias) WasReferenced() bool

type AliasReference added in v0.0.2

type AliasReference struct {
	// contains filtered or unexported fields
}

func NewAliasReference added in v0.0.2

func NewAliasReference(ident *NamedDefinitionTypeReference, reference *Alias) *AliasReference

func (*AliasReference) Alias added in v0.0.2

func (g *AliasReference) Alias() *Alias

func (*AliasReference) FetchPositionLength added in v0.0.2

func (g *AliasReference) FetchPositionLength() token.SourceFileReference

func (*AliasReference) HumanReadable added in v0.0.2

func (g *AliasReference) HumanReadable() string

func (*AliasReference) MarkAsReferenced added in v0.0.2

func (g *AliasReference) MarkAsReferenced()

func (*AliasReference) NameReference added in v0.0.2

func (g *AliasReference) NameReference() *NamedDefinitionTypeReference

func (*AliasReference) Next added in v0.0.2

func (g *AliasReference) Next() dtype.Type

func (*AliasReference) ParameterCount added in v0.0.2

func (g *AliasReference) ParameterCount() int

func (*AliasReference) Resolve added in v0.0.2

func (g *AliasReference) Resolve() (dtype.Atom, error)

func (*AliasReference) String added in v0.0.2

func (g *AliasReference) String() string

func (*AliasReference) Type added in v0.0.4

func (g *AliasReference) Type() dtype.Type

func (*AliasReference) WasReferenced added in v0.0.2

func (g *AliasReference) WasReferenced() bool

type AnyMatchingTypes added in v0.0.2

type AnyMatchingTypes struct {
	// contains filtered or unexported fields
}

func NewAnyMatchingTypes added in v0.0.2

func NewAnyMatchingTypes(identifier *ast.AnyMatchingType) *AnyMatchingTypes

func (*AnyMatchingTypes) AtomName added in v0.0.2

func (u *AnyMatchingTypes) AtomName() string

func (*AnyMatchingTypes) FetchPositionLength added in v0.0.2

func (u *AnyMatchingTypes) FetchPositionLength() token.SourceFileReference

func (*AnyMatchingTypes) HumanReadable added in v0.0.2

func (u *AnyMatchingTypes) HumanReadable() string

func (*AnyMatchingTypes) Identifier added in v0.0.2

func (u *AnyMatchingTypes) Identifier() *ast.AnyMatchingType

func (*AnyMatchingTypes) IsEqual added in v0.0.2

func (u *AnyMatchingTypes) IsEqual(_ dtype.Atom) error

func (*AnyMatchingTypes) Next added in v0.0.2

func (u *AnyMatchingTypes) Next() dtype.Type

func (*AnyMatchingTypes) ParameterCount added in v0.0.2

func (u *AnyMatchingTypes) ParameterCount() int

func (*AnyMatchingTypes) Resolve added in v0.0.2

func (u *AnyMatchingTypes) Resolve() (dtype.Atom, error)

func (*AnyMatchingTypes) String added in v0.0.2

func (u *AnyMatchingTypes) String() string

func (*AnyMatchingTypes) WasReferenced added in v0.0.4

func (u *AnyMatchingTypes) WasReferenced() bool

type ArtifactFullyQualifiedModuleName

type ArtifactFullyQualifiedModuleName struct {
	ModuleName
}

func MakeArtifactFullyQualifiedModuleName

func MakeArtifactFullyQualifiedModuleName(path *ast.ModuleReference) ArtifactFullyQualifiedModuleName

func (ArtifactFullyQualifiedModuleName) JoinLocalName

func (ArtifactFullyQualifiedModuleName) JoinTypeIdentifier

func (ArtifactFullyQualifiedModuleName) JoinTypeIdentifierScoped

func (ArtifactFullyQualifiedModuleName) String

type ArtifactFullyQualifiedTypeName

type ArtifactFullyQualifiedTypeName struct {
	ModuleName
}

type ByFieldName

type ByFieldName []*RecordField

func (ByFieldName) Len

func (a ByFieldName) Len() int

func (ByFieldName) Less

func (a ByFieldName) Less(i, j int) bool

func (ByFieldName) Swap

func (a ByFieldName) Swap(i, j int)

type CustomTypeAtom

type CustomTypeAtom struct {
	// contains filtered or unexported fields
}

func NewCustomTypePrepare added in v0.0.6

func NewCustomTypePrepare(astCustomType *ast.CustomType, artifactTypeName ArtifactFullyQualifiedTypeName,
	generics []dtype.Type) *CustomTypeAtom

func (*CustomTypeAtom) AddReferee added in v0.0.2

func (s *CustomTypeAtom) AddReferee(reference *CustomTypeReference)

func (*CustomTypeAtom) ArtifactTypeName

func (s *CustomTypeAtom) ArtifactTypeName() ArtifactFullyQualifiedTypeName

func (*CustomTypeAtom) AstCustomType

func (s *CustomTypeAtom) AstCustomType() *ast.CustomType

func (*CustomTypeAtom) AtomName

func (s *CustomTypeAtom) AtomName() string

func (*CustomTypeAtom) DecoratedName

func (s *CustomTypeAtom) DecoratedName() string

func (*CustomTypeAtom) FetchPositionLength

func (s *CustomTypeAtom) FetchPositionLength() token.SourceFileReference

func (*CustomTypeAtom) FinalizeVariants added in v0.0.6

func (s *CustomTypeAtom) FinalizeVariants(variants []*CustomTypeVariantAtom)

func (*CustomTypeAtom) FindVariant

func (s *CustomTypeAtom) FindVariant(name string) *CustomTypeVariantAtom

func (*CustomTypeAtom) GenericNames added in v0.0.6

func (s *CustomTypeAtom) GenericNames() []*dtype.TypeArgumentName

func (*CustomTypeAtom) HasVariant

func (s *CustomTypeAtom) HasVariant(variantToLookFor *CustomTypeVariantAtom) bool

func (*CustomTypeAtom) HumanReadable

func (s *CustomTypeAtom) HumanReadable() string

func (*CustomTypeAtom) IsEqual

func (u *CustomTypeAtom) IsEqual(other_ dtype.Atom) error

func (*CustomTypeAtom) IsVariantEqual

func (s *CustomTypeAtom) IsVariantEqual(otherVariant *CustomTypeVariantAtom) error

func (*CustomTypeAtom) MemoryAlignment added in v0.0.4

func (s *CustomTypeAtom) MemoryAlignment() MemoryAlign

func (*CustomTypeAtom) MemorySize added in v0.0.4

func (s *CustomTypeAtom) MemorySize() MemorySize

func (*CustomTypeAtom) Name

func (s *CustomTypeAtom) Name() string

func (*CustomTypeAtom) Next

func (s *CustomTypeAtom) Next() dtype.Type

func (*CustomTypeAtom) ParameterCount

func (s *CustomTypeAtom) ParameterCount() int

func (*CustomTypeAtom) Parameters added in v0.0.6

func (s *CustomTypeAtom) Parameters() []dtype.Type

func (*CustomTypeAtom) References added in v0.0.2

func (s *CustomTypeAtom) References() []*CustomTypeReference

func (*CustomTypeAtom) Resolve

func (s *CustomTypeAtom) Resolve() (dtype.Atom, error)

func (*CustomTypeAtom) StatementString

func (s *CustomTypeAtom) StatementString() string

func (*CustomTypeAtom) String

func (s *CustomTypeAtom) String() string

func (*CustomTypeAtom) TypeIdentifier

func (s *CustomTypeAtom) TypeIdentifier() *ast.TypeIdentifier

func (*CustomTypeAtom) VariantCount

func (s *CustomTypeAtom) VariantCount() int

func (*CustomTypeAtom) Variants

func (s *CustomTypeAtom) Variants() []*CustomTypeVariantAtom

func (*CustomTypeAtom) WasReferenced added in v0.0.4

func (s *CustomTypeAtom) WasReferenced() bool

type CustomTypeReference added in v0.0.2

type CustomTypeReference struct {
	// contains filtered or unexported fields
}

func NewCustomTypeReference added in v0.0.2

func NewCustomTypeReference(named *NamedDefinitionTypeReference, customType *CustomTypeAtom) *CustomTypeReference

func (*CustomTypeReference) AstIdentifier added in v0.0.2

func (*CustomTypeReference) CustomTypeAtom added in v0.0.2

func (g *CustomTypeReference) CustomTypeAtom() *CustomTypeAtom

func (*CustomTypeReference) FetchPositionLength added in v0.0.2

func (g *CustomTypeReference) FetchPositionLength() token.SourceFileReference

func (*CustomTypeReference) HumanReadable added in v0.0.2

func (g *CustomTypeReference) HumanReadable() string

func (*CustomTypeReference) NameReference added in v0.0.2

func (*CustomTypeReference) Next added in v0.0.2

func (g *CustomTypeReference) Next() dtype.Type

func (*CustomTypeReference) ParameterCount added in v0.0.2

func (g *CustomTypeReference) ParameterCount() int

func (*CustomTypeReference) Resolve added in v0.0.2

func (g *CustomTypeReference) Resolve() (dtype.Atom, error)

func (*CustomTypeReference) String added in v0.0.2

func (g *CustomTypeReference) String() string

func (*CustomTypeReference) Type added in v0.0.2

func (g *CustomTypeReference) Type() dtype.Type

func (*CustomTypeReference) WasReferenced added in v0.0.4

func (g *CustomTypeReference) WasReferenced() bool

type CustomTypeVariantAtom added in v0.0.6

type CustomTypeVariantAtom struct {
	// contains filtered or unexported fields
}

func NewCustomTypeVariant

func NewCustomTypeVariant(index int, inCustomType *CustomTypeAtom, astCustomTypeVariant *ast.CustomTypeVariant, parameterTypes []dtype.Type) *CustomTypeVariantAtom

func (*CustomTypeVariantAtom) AddReferee added in v0.0.6

func (s *CustomTypeVariantAtom) AddReferee(reference *CustomTypeVariantReference)

func (*CustomTypeVariantAtom) AstCustomTypeVariant added in v0.0.6

func (s *CustomTypeVariantAtom) AstCustomTypeVariant() *ast.CustomTypeVariant

func (*CustomTypeVariantAtom) AtomName added in v0.0.6

func (s *CustomTypeVariantAtom) AtomName() string

func (*CustomTypeVariantAtom) DecoratedName added in v0.0.6

func (s *CustomTypeVariantAtom) DecoratedName() string

func (*CustomTypeVariantAtom) FetchPositionLength added in v0.0.6

func (s *CustomTypeVariantAtom) FetchPositionLength() token.SourceFileReference

func (*CustomTypeVariantAtom) Fields added in v0.0.6

func (*CustomTypeVariantAtom) HumanReadable added in v0.0.6

func (s *CustomTypeVariantAtom) HumanReadable() string

func (*CustomTypeVariantAtom) InCustomType added in v0.0.6

func (s *CustomTypeVariantAtom) InCustomType() *CustomTypeAtom

func (*CustomTypeVariantAtom) Index added in v0.0.6

func (s *CustomTypeVariantAtom) Index() int

func (*CustomTypeVariantAtom) IsEqual added in v0.0.6

func (s *CustomTypeVariantAtom) IsEqual(other_ dtype.Atom) error

func (*CustomTypeVariantAtom) MemoryAlignment added in v0.0.6

func (s *CustomTypeVariantAtom) MemoryAlignment() MemoryAlign

func (*CustomTypeVariantAtom) MemorySize added in v0.0.6

func (s *CustomTypeVariantAtom) MemorySize() MemorySize

func (*CustomTypeVariantAtom) Name added in v0.0.6

func (*CustomTypeVariantAtom) Next added in v0.0.6

func (s *CustomTypeVariantAtom) Next() dtype.Type

func (*CustomTypeVariantAtom) ParameterCount added in v0.0.6

func (s *CustomTypeVariantAtom) ParameterCount() int

func (*CustomTypeVariantAtom) ParameterTypes added in v0.0.6

func (s *CustomTypeVariantAtom) ParameterTypes() []dtype.Type

func (*CustomTypeVariantAtom) ParentType added in v0.0.6

func (s *CustomTypeVariantAtom) ParentType() dtype.Type

func (*CustomTypeVariantAtom) References added in v0.0.6

func (*CustomTypeVariantAtom) Resolve added in v0.0.6

func (s *CustomTypeVariantAtom) Resolve() (dtype.Atom, error)

func (*CustomTypeVariantAtom) String added in v0.0.6

func (s *CustomTypeVariantAtom) String() string

func (*CustomTypeVariantAtom) WasReferenced added in v0.0.6

func (s *CustomTypeVariantAtom) WasReferenced() bool

type CustomTypeVariantField added in v0.0.4

type CustomTypeVariantField struct {
	// contains filtered or unexported fields
}

func NewCustomTypeVariantField added in v0.0.6

func NewCustomTypeVariantField(index uint, fieldType dtype.Type) *CustomTypeVariantField

func (*CustomTypeVariantField) MemoryOffset added in v0.0.4

func (c *CustomTypeVariantField) MemoryOffset() MemoryOffset

func (*CustomTypeVariantField) MemorySize added in v0.0.4

func (c *CustomTypeVariantField) MemorySize() MemorySize

func (*CustomTypeVariantField) String added in v0.0.6

func (c *CustomTypeVariantField) String() string

func (*CustomTypeVariantField) Type added in v0.0.4

func (c *CustomTypeVariantField) Type() dtype.Type

type CustomTypeVariantReference added in v0.0.2

type CustomTypeVariantReference struct {
	// contains filtered or unexported fields
}

func NewCustomTypeVariantReference added in v0.0.2

func NewCustomTypeVariantReference(named *NamedDefinitionTypeReference, customTypeVariant *CustomTypeVariantAtom) *CustomTypeVariantReference

func (*CustomTypeVariantReference) AstIdentifier added in v0.0.2

func (*CustomTypeVariantReference) CustomTypeVariant added in v0.0.2

func (g *CustomTypeVariantReference) CustomTypeVariant() *CustomTypeVariantAtom

func (*CustomTypeVariantReference) FetchPositionLength added in v0.0.2

func (g *CustomTypeVariantReference) FetchPositionLength() token.SourceFileReference

func (*CustomTypeVariantReference) HumanReadable added in v0.0.2

func (g *CustomTypeVariantReference) HumanReadable() string

func (*CustomTypeVariantReference) NameReference added in v0.0.2

func (*CustomTypeVariantReference) Next added in v0.0.2

func (*CustomTypeVariantReference) ParameterCount added in v0.0.2

func (g *CustomTypeVariantReference) ParameterCount() int

func (*CustomTypeVariantReference) Resolve added in v0.0.2

func (g *CustomTypeVariantReference) Resolve() (dtype.Atom, error)

func (*CustomTypeVariantReference) String added in v0.0.2

func (g *CustomTypeVariantReference) String() string

func (*CustomTypeVariantReference) Type added in v0.0.2

func (*CustomTypeVariantReference) WasReferenced added in v0.0.4

func (g *CustomTypeVariantReference) WasReferenced() bool

type FunctionAtom

type FunctionAtom struct {
	// contains filtered or unexported fields
}

func NewFunctionAtom

func NewFunctionAtom(astFunctionType *ast.FunctionType, parameterTypes []dtype.Type) *FunctionAtom

func SmashFunctions

func SmashFunctions(original *FunctionAtom, otherFunc *FunctionAtom) (*FunctionAtom, error)

func (*FunctionAtom) AtomName

func (u *FunctionAtom) AtomName() string

func (*FunctionAtom) FetchPositionLength

func (u *FunctionAtom) FetchPositionLength() token.SourceFileReference

func (*FunctionAtom) FunctionParameterTypes

func (u *FunctionAtom) FunctionParameterTypes() []dtype.Type

func (*FunctionAtom) HumanReadable

func (u *FunctionAtom) HumanReadable() string

func (*FunctionAtom) IsEqual

func (u *FunctionAtom) IsEqual(other_ dtype.Atom) error

func (*FunctionAtom) Next

func (u *FunctionAtom) Next() dtype.Type

func (*FunctionAtom) ParameterAndReturn

func (u *FunctionAtom) ParameterAndReturn() ([]dtype.Type, dtype.Type)

func (*FunctionAtom) ParameterCount

func (u *FunctionAtom) ParameterCount() int

func (*FunctionAtom) Resolve

func (u *FunctionAtom) Resolve() (dtype.Atom, error)

func (*FunctionAtom) ReturnType

func (u *FunctionAtom) ReturnType() dtype.Type

func (*FunctionAtom) String

func (u *FunctionAtom) String() string

func (*FunctionAtom) WasReferenced added in v0.0.4

func (u *FunctionAtom) WasReferenced() bool

type FunctionAtomMismatch

type FunctionAtomMismatch struct {
	Expected    dtype.Type
	Encountered dtype.Type
}

func (FunctionAtomMismatch) Error

func (e FunctionAtomMismatch) Error() string

type FunctionTypeLike

type FunctionTypeLike interface {
	dtype.Type
	ReturnType() dtype.Type
	ParameterAndReturn() ([]dtype.Type, dtype.Type)
}

type FunctionTypeReference

type FunctionTypeReference struct {
	// contains filtered or unexported fields
}

func NewFunctionTypeReference

func NewFunctionTypeReference(astFunctionType *ast.FunctionType, referencedType *FunctionAtom, named *NamedDefinitionTypeReference) *FunctionTypeReference

func (*FunctionTypeReference) DecoratedName

func (t *FunctionTypeReference) DecoratedName() string

func (*FunctionTypeReference) FetchPositionLength

func (t *FunctionTypeReference) FetchPositionLength() token.SourceFileReference

func (*FunctionTypeReference) FunctionAtom

func (t *FunctionTypeReference) FunctionAtom() *FunctionAtom

func (*FunctionTypeReference) HumanReadable

func (t *FunctionTypeReference) HumanReadable() string

func (*FunctionTypeReference) NameReference added in v0.0.2

func (*FunctionTypeReference) Next

func (t *FunctionTypeReference) Next() dtype.Type

func (*FunctionTypeReference) ParameterAndReturn

func (t *FunctionTypeReference) ParameterAndReturn() ([]dtype.Type, dtype.Type)

func (*FunctionTypeReference) ParameterCount

func (t *FunctionTypeReference) ParameterCount() int

func (*FunctionTypeReference) Resolve

func (t *FunctionTypeReference) Resolve() (dtype.Atom, error)

func (*FunctionTypeReference) ReturnType

func (t *FunctionTypeReference) ReturnType() dtype.Type

func (*FunctionTypeReference) String

func (t *FunctionTypeReference) String() string

func (*FunctionTypeReference) WasReferenced added in v0.0.4

func (t *FunctionTypeReference) WasReferenced() bool

type InternalError

type InternalError struct {
	Err error
}

func (*InternalError) Error

func (e *InternalError) Error() string

func (*InternalError) FetchPositionLength

func (e *InternalError) FetchPositionLength() token.SourceFileReference

type InvokerType

type InvokerType struct {
	// contains filtered or unexported fields
}

func NewInvokerType

func NewInvokerType(typeToInvoke dtype.Type, params []dtype.Type) (*InvokerType, decshared.DecoratedError)

func (*InvokerType) FetchPositionLength

func (u *InvokerType) FetchPositionLength() token.SourceFileReference

func (*InvokerType) HumanReadable

func (u *InvokerType) HumanReadable() string

func (*InvokerType) Next

func (u *InvokerType) Next() dtype.Type

func (*InvokerType) ParameterCount

func (u *InvokerType) ParameterCount() int

func (*InvokerType) Params

func (u *InvokerType) Params() []dtype.Type

func (*InvokerType) Resolve

func (u *InvokerType) Resolve() (dtype.Atom, error)

func (*InvokerType) String

func (u *InvokerType) String() string

func (*InvokerType) TypeGenerator

func (u *InvokerType) TypeGenerator() dtype.Type

func (*InvokerType) WasReferenced added in v0.0.4

func (u *InvokerType) WasReferenced() bool

type LocalType

type LocalType struct {
	// contains filtered or unexported fields
}

func NewLocalType

func NewLocalType(identifier *ast.TypeParameter) *LocalType

func (*LocalType) AtomName

func (u *LocalType) AtomName() string

func (*LocalType) FetchPositionLength

func (u *LocalType) FetchPositionLength() token.SourceFileReference

func (*LocalType) HumanReadable

func (u *LocalType) HumanReadable() string

func (*LocalType) Identifier

func (u *LocalType) Identifier() *ast.TypeParameter

func (*LocalType) IsEqual

func (u *LocalType) IsEqual(_ dtype.Atom) error

func (*LocalType) MarkAsReferenced added in v0.0.2

func (u *LocalType) MarkAsReferenced()

func (*LocalType) Next

func (u *LocalType) Next() dtype.Type

func (*LocalType) ParameterCount

func (u *LocalType) ParameterCount() int

func (*LocalType) Resolve

func (u *LocalType) Resolve() (dtype.Atom, error)

func (*LocalType) String

func (u *LocalType) String() string

func (*LocalType) WasReferenced added in v0.0.2

func (u *LocalType) WasReferenced() bool

type Lookup

type Lookup interface {
	LookupType(name string) (dtype.Type, error)
}

type MemoryAlign added in v0.0.4

type MemoryAlign uint32

type MemoryOffset added in v0.0.4

type MemoryOffset uint32

type MemorySize added in v0.0.4

type MemorySize uint32

type ModuleName

type ModuleName struct {
	// contains filtered or unexported fields
}

ModuleName is similar to a ModuleReference, however path can be nil

func MakeModuleName

func MakeModuleName(path *ast.ModuleReference) ModuleName

func MakeModuleNameFromParts added in v0.0.2

func MakeModuleNameFromParts(parts []*ast.ModuleNamePart) ModuleName

func MakeModuleNameFromString

func MakeModuleNameFromString(name string, document *token.SourceFileDocument) ModuleName

func (ModuleName) Last added in v0.0.4

func (m ModuleName) Last() string

func (ModuleName) Path

func (m ModuleName) Path() *ast.ModuleReference

func (ModuleName) String

func (m ModuleName) String() string

type NamedDefinitionTypeReference added in v0.0.2

type NamedDefinitionTypeReference struct {
	// contains filtered or unexported fields
}

func NewNamedDefinitionTypeReference added in v0.0.2

func NewNamedDefinitionTypeReference(optionalModuleReference modref.ModuleReferencer, ident ast.TypeReferenceScopedOrNormal) *NamedDefinitionTypeReference

func (*NamedDefinitionTypeReference) AstIdentifier added in v0.0.2

func (*NamedDefinitionTypeReference) DebugString added in v0.0.2

func (r *NamedDefinitionTypeReference) DebugString() string

func (*NamedDefinitionTypeReference) FetchPositionLength added in v0.0.2

func (r *NamedDefinitionTypeReference) FetchPositionLength() token.SourceFileReference

func (*NamedDefinitionTypeReference) ModuleReference added in v0.0.2

func (*NamedDefinitionTypeReference) String added in v0.0.2

type PackageRelativeModuleName

type PackageRelativeModuleName struct {
	ModuleName
}

func MakePackageRelativeModuleName

func MakePackageRelativeModuleName(path *ast.ModuleReference) PackageRelativeModuleName

func MakePackageRelativeModuleNameFromString

func MakePackageRelativeModuleNameFromString(name string, document *token.SourceFileDocument) PackageRelativeModuleName

func NewPackageRelativeModuleName

func NewPackageRelativeModuleName(path *ast.ModuleReference) PackageRelativeModuleName

func (PackageRelativeModuleName) JoinLocalName

func (n PackageRelativeModuleName) JoinLocalName(relative *ast.VariableIdentifier) string

type PackageRootModuleName

type PackageRootModuleName struct {
	ModuleName
}

func MakePackageRootModuleName

func MakePackageRootModuleName(path *ast.ModuleReference) PackageRootModuleName

func MakePackageRootModuleNameFromString

func MakePackageRootModuleNameFromString(name string, document *token.SourceFileDocument) PackageRootModuleName

func (PackageRootModuleName) Join

type PrimitiveAtom

type PrimitiveAtom struct {
	// contains filtered or unexported fields
}

func GetListType added in v0.0.4

func GetListType(p dtype.Type) (*PrimitiveAtom, error)

func NewAnyType

func NewAnyType() *PrimitiveAtom

func NewPrimitiveType

func NewPrimitiveType(name *ast.TypeIdentifier, genericTypes []dtype.Type) *PrimitiveAtom

func (*PrimitiveAtom) AddReferee added in v0.0.2

func (u *PrimitiveAtom) AddReferee(reference *PrimitiveTypeReference)

func (*PrimitiveAtom) AtomName

func (u *PrimitiveAtom) AtomName() string

func (*PrimitiveAtom) FetchPositionLength

func (u *PrimitiveAtom) FetchPositionLength() token.SourceFileReference

func (*PrimitiveAtom) GenericTypes

func (u *PrimitiveAtom) GenericTypes() []dtype.Type

func (*PrimitiveAtom) HumanReadable

func (u *PrimitiveAtom) HumanReadable() string

func (*PrimitiveAtom) IsEqual

func (u *PrimitiveAtom) IsEqual(other_ dtype.Atom) error

func (*PrimitiveAtom) Next

func (u *PrimitiveAtom) Next() dtype.Type

func (*PrimitiveAtom) ParameterCount

func (u *PrimitiveAtom) ParameterCount() int

func (*PrimitiveAtom) PrimitiveName

func (u *PrimitiveAtom) PrimitiveName() *ast.TypeIdentifier

func (*PrimitiveAtom) References added in v0.0.2

func (u *PrimitiveAtom) References() []*PrimitiveTypeReference

func (*PrimitiveAtom) Resolve

func (u *PrimitiveAtom) Resolve() (dtype.Atom, error)

func (*PrimitiveAtom) String

func (u *PrimitiveAtom) String() string

func (*PrimitiveAtom) WasReferenced added in v0.0.4

func (u *PrimitiveAtom) WasReferenced() bool

type PrimitiveTypeReference added in v0.0.2

type PrimitiveTypeReference struct {
	// contains filtered or unexported fields
}

func NewPrimitiveTypeReference added in v0.0.2

func NewPrimitiveTypeReference(named *NamedDefinitionTypeReference, primitiveType *PrimitiveAtom) *PrimitiveTypeReference

func (*PrimitiveTypeReference) AstIdentifier added in v0.0.2

func (*PrimitiveTypeReference) FetchPositionLength added in v0.0.2

func (g *PrimitiveTypeReference) FetchPositionLength() token.SourceFileReference

func (*PrimitiveTypeReference) HumanReadable added in v0.0.2

func (g *PrimitiveTypeReference) HumanReadable() string

func (*PrimitiveTypeReference) NameReference added in v0.0.2

func (*PrimitiveTypeReference) Next added in v0.0.2

func (g *PrimitiveTypeReference) Next() dtype.Type

func (*PrimitiveTypeReference) ParameterCount added in v0.0.2

func (g *PrimitiveTypeReference) ParameterCount() int

func (*PrimitiveTypeReference) PrimitiveAtom added in v0.0.2

func (g *PrimitiveTypeReference) PrimitiveAtom() *PrimitiveAtom

func (*PrimitiveTypeReference) Resolve added in v0.0.2

func (g *PrimitiveTypeReference) Resolve() (dtype.Atom, error)

func (*PrimitiveTypeReference) String added in v0.0.2

func (g *PrimitiveTypeReference) String() string

func (*PrimitiveTypeReference) Type added in v0.0.2

func (g *PrimitiveTypeReference) Type() dtype.Type

func (*PrimitiveTypeReference) WasReferenced added in v0.0.4

func (g *PrimitiveTypeReference) WasReferenced() bool

type RecordAtom

type RecordAtom struct {
	// contains filtered or unexported fields
}

func NewRecordType

func NewRecordType(info *ast.Record, fields []*RecordField, genericTypes []dtype.Type) *RecordAtom

func ResolveToRecordType

func ResolveToRecordType(expectedRecord dtype.Type) (*RecordAtom, error)

func (*RecordAtom) AstRecord

func (s *RecordAtom) AstRecord() *ast.Record

func (*RecordAtom) AtomName

func (s *RecordAtom) AtomName() string

func (*RecordAtom) FetchPositionLength

func (s *RecordAtom) FetchPositionLength() token.SourceFileReference

func (*RecordAtom) FieldCount

func (s *RecordAtom) FieldCount() int

func (*RecordAtom) FindField

func (s *RecordAtom) FindField(name string) *RecordField

func (*RecordAtom) GenericTypes

func (s *RecordAtom) GenericTypes() []dtype.Type

func (*RecordAtom) HumanReadable

func (s *RecordAtom) HumanReadable() string

func (*RecordAtom) IsEqual

func (u *RecordAtom) IsEqual(other_ dtype.Atom) error

func (*RecordAtom) MemoryAlignment added in v0.0.4

func (s *RecordAtom) MemoryAlignment() MemoryAlign

func (*RecordAtom) MemorySize added in v0.0.4

func (s *RecordAtom) MemorySize() MemorySize

func (*RecordAtom) NameFromSortedFields added in v0.0.6

func (s *RecordAtom) NameFromSortedFields() string

func (*RecordAtom) Next

func (u *RecordAtom) Next() dtype.Type

func (*RecordAtom) ParameterCount

func (s *RecordAtom) ParameterCount() int

func (*RecordAtom) ParseOrderedFields

func (s *RecordAtom) ParseOrderedFields() []*RecordField

func (*RecordAtom) Resolve

func (u *RecordAtom) Resolve() (dtype.Atom, error)

func (*RecordAtom) SortedFields

func (s *RecordAtom) SortedFields() []*RecordField

func (*RecordAtom) String

func (s *RecordAtom) String() string

func (*RecordAtom) WasReferenced added in v0.0.4

func (u *RecordAtom) WasReferenced() bool

type RecordField

type RecordField struct {
	// contains filtered or unexported fields
}

func NewRecordField

func NewRecordField(fieldName *RecordFieldName, recordTypeField *ast.RecordTypeField, fieldType dtype.Type) *RecordField

func (*RecordField) AstRecordTypeField added in v0.0.2

func (s *RecordField) AstRecordTypeField() *ast.RecordTypeField

func (*RecordField) FieldName

func (s *RecordField) FieldName() *RecordFieldName

func (*RecordField) HumanReadable

func (s *RecordField) HumanReadable() string

func (*RecordField) Index

func (s *RecordField) Index() int

func (*RecordField) MemoryOffset added in v0.0.4

func (s *RecordField) MemoryOffset() MemoryOffset

func (*RecordField) MemorySize added in v0.0.4

func (s *RecordField) MemorySize() MemorySize

func (*RecordField) Name

func (s *RecordField) Name() string

func (*RecordField) SetIndexBySorter

func (s *RecordField) SetIndexBySorter(index int)

func (*RecordField) String

func (s *RecordField) String() string

func (*RecordField) Type

func (s *RecordField) Type() dtype.Type

func (*RecordField) VariableIdentifier

func (s *RecordField) VariableIdentifier() *ast.VariableIdentifier

type RecordFieldName

type RecordFieldName struct {
	// contains filtered or unexported fields
}

func NewRecordFieldName

func NewRecordFieldName(identifier *ast.VariableIdentifier) *RecordFieldName

func (*RecordFieldName) FetchPositionLength

func (r *RecordFieldName) FetchPositionLength() token.SourceFileReference

func (*RecordFieldName) HumanReadable

func (r *RecordFieldName) HumanReadable() string

func (*RecordFieldName) Name

func (*RecordFieldName) String

func (r *RecordFieldName) String() string

type SingleModuleName

type SingleModuleName struct {
	ModuleName
}

func MakeSingleModuleName

func MakeSingleModuleName(path *ast.TypeIdentifier) SingleModuleName

func (SingleModuleName) IsEmpty

func (m SingleModuleName) IsEmpty() bool

type TupleTypeAtom added in v0.0.2

type TupleTypeAtom struct {
	// contains filtered or unexported fields
}

func NewTupleTypeAtom added in v0.0.2

func NewTupleTypeAtom(astTupleType *ast.TupleType, parameterFields []*TupleTypeField) *TupleTypeAtom

func (*TupleTypeAtom) AtomName added in v0.0.2

func (u *TupleTypeAtom) AtomName() string

func (*TupleTypeAtom) FetchPositionLength added in v0.0.2

func (u *TupleTypeAtom) FetchPositionLength() token.SourceFileReference

func (*TupleTypeAtom) Fields added in v0.0.4

func (u *TupleTypeAtom) Fields() []*TupleTypeField

func (*TupleTypeAtom) HumanReadable added in v0.0.2

func (u *TupleTypeAtom) HumanReadable() string

func (*TupleTypeAtom) IsEqual added in v0.0.2

func (u *TupleTypeAtom) IsEqual(other_ dtype.Atom) error

func (*TupleTypeAtom) MemoryAlignment added in v0.0.4

func (u *TupleTypeAtom) MemoryAlignment() MemoryAlign

func (*TupleTypeAtom) MemorySize added in v0.0.4

func (u *TupleTypeAtom) MemorySize() MemorySize

func (*TupleTypeAtom) Next added in v0.0.2

func (u *TupleTypeAtom) Next() dtype.Type

func (*TupleTypeAtom) ParameterAndReturn added in v0.0.2

func (u *TupleTypeAtom) ParameterAndReturn() ([]dtype.Type, dtype.Type)

func (*TupleTypeAtom) ParameterCount added in v0.0.2

func (u *TupleTypeAtom) ParameterCount() int

func (*TupleTypeAtom) ParameterTypes added in v0.0.2

func (u *TupleTypeAtom) ParameterTypes() []dtype.Type

func (*TupleTypeAtom) Resolve added in v0.0.2

func (u *TupleTypeAtom) Resolve() (dtype.Atom, error)

func (*TupleTypeAtom) ReturnType added in v0.0.2

func (u *TupleTypeAtom) ReturnType() dtype.Type

func (*TupleTypeAtom) String added in v0.0.2

func (u *TupleTypeAtom) String() string

func (*TupleTypeAtom) WasReferenced added in v0.0.4

func (u *TupleTypeAtom) WasReferenced() bool

type TupleTypeField added in v0.0.4

type TupleTypeField struct {
	// contains filtered or unexported fields
}

func NewTupleTypeField added in v0.0.4

func NewTupleTypeField(index int, fieldType dtype.Type) *TupleTypeField

func (*TupleTypeField) HumanReadable added in v0.0.4

func (s *TupleTypeField) HumanReadable() string

func (*TupleTypeField) Index added in v0.0.4

func (s *TupleTypeField) Index() int

func (*TupleTypeField) MemoryOffset added in v0.0.4

func (s *TupleTypeField) MemoryOffset() MemoryOffset

func (*TupleTypeField) MemorySize added in v0.0.4

func (s *TupleTypeField) MemorySize() MemorySize

func (*TupleTypeField) SetIndexBySorter added in v0.0.4

func (s *TupleTypeField) SetIndexBySorter(index int)

func (*TupleTypeField) String added in v0.0.4

func (s *TupleTypeField) String() string

func (*TupleTypeField) Type added in v0.0.4

func (s *TupleTypeField) Type() dtype.Type

type TypeParameterContextDynamic

type TypeParameterContextDynamic struct {
	// contains filtered or unexported fields
}

func NewTypeParameterContextDynamic

func NewTypeParameterContextDynamic(names []*dtype.TypeArgumentName) *TypeParameterContextDynamic

func (*TypeParameterContextDynamic) ArgumentNames

func (t *TypeParameterContextDynamic) ArgumentNames() []*dtype.TypeArgumentName

func (*TypeParameterContextDynamic) ArgumentNamesCount

func (t *TypeParameterContextDynamic) ArgumentNamesCount() int

func (*TypeParameterContextDynamic) ArgumentTypes

func (t *TypeParameterContextDynamic) ArgumentTypes() []dtype.Type

func (*TypeParameterContextDynamic) DebugString

func (t *TypeParameterContextDynamic) DebugString() string

func (*TypeParameterContextDynamic) DeclareString

func (t *TypeParameterContextDynamic) DeclareString() string

func (*TypeParameterContextDynamic) FillOutTheRestWithAny

func (t *TypeParameterContextDynamic) FillOutTheRestWithAny()

func (*TypeParameterContextDynamic) LookupType

func (t *TypeParameterContextDynamic) LookupType(name string) (dtype.Type, error)

func (*TypeParameterContextDynamic) LookupTypeFromArgument

func (t *TypeParameterContextDynamic) LookupTypeFromArgument(param *dtype.TypeArgumentName) dtype.Type

func (*TypeParameterContextDynamic) LookupTypeFromName

func (t *TypeParameterContextDynamic) LookupTypeFromName(name string) dtype.Type

func (*TypeParameterContextDynamic) SpecialSet

func (t *TypeParameterContextDynamic) SpecialSet(name string, resolved dtype.Type) error

func (*TypeParameterContextDynamic) String

func (t *TypeParameterContextDynamic) String() string

func (*TypeParameterContextDynamic) Verify

func (t *TypeParameterContextDynamic) Verify() error

type TypeParameterContextOther

type TypeParameterContextOther struct {
	// contains filtered or unexported fields
}

func NewTypeParameterContextOther

func NewTypeParameterContextOther() *TypeParameterContextOther

func (*TypeParameterContextOther) DebugString

func (t *TypeParameterContextOther) DebugString() string

func (*TypeParameterContextOther) DeclareString

func (t *TypeParameterContextOther) DeclareString() string

func (*TypeParameterContextOther) LookupType

func (t *TypeParameterContextOther) LookupType(name string) (dtype.Type, error)

func (*TypeParameterContextOther) LookupTypeFromArgument

func (t *TypeParameterContextOther) LookupTypeFromArgument(param *dtype.TypeArgumentName) dtype.Type

func (*TypeParameterContextOther) LookupTypeFromName

func (t *TypeParameterContextOther) LookupTypeFromName(name string) dtype.Type

func (*TypeParameterContextOther) SpecialSet

func (t *TypeParameterContextOther) SpecialSet(name string, resolved dtype.Type) (dtype.Type, error)

func (*TypeParameterContextOther) String

func (t *TypeParameterContextOther) String() string

func (*TypeParameterContextOther) Verify

func (t *TypeParameterContextOther) Verify() error

type TypeReferenceScopedOrNormal

type TypeReferenceScopedOrNormal interface {
	dtype.Type
	NameReference() *NamedDefinitionTypeReference
}

type UnmanagedType added in v0.0.2

type UnmanagedType struct {
	// contains filtered or unexported fields
}

func NewUnmanagedType added in v0.0.2

func NewUnmanagedType(identifier *ast.UnmanagedType) *UnmanagedType

func (*UnmanagedType) AtomName added in v0.0.2

func (u *UnmanagedType) AtomName() string

func (*UnmanagedType) FetchPositionLength added in v0.0.2

func (u *UnmanagedType) FetchPositionLength() token.SourceFileReference

func (*UnmanagedType) HumanReadable added in v0.0.2

func (u *UnmanagedType) HumanReadable() string

func (*UnmanagedType) Identifier added in v0.0.2

func (u *UnmanagedType) Identifier() *ast.UnmanagedType

func (*UnmanagedType) IsEqual added in v0.0.2

func (u *UnmanagedType) IsEqual(other_ dtype.Atom) error

func (*UnmanagedType) IsEqualUnmanaged added in v0.0.2

func (u *UnmanagedType) IsEqualUnmanaged(other *UnmanagedType) error

func (*UnmanagedType) MarkAsReferenced added in v0.0.2

func (u *UnmanagedType) MarkAsReferenced()

func (*UnmanagedType) Next added in v0.0.2

func (u *UnmanagedType) Next() dtype.Type

func (*UnmanagedType) ParameterCount added in v0.0.2

func (u *UnmanagedType) ParameterCount() int

func (*UnmanagedType) Resolve added in v0.0.2

func (u *UnmanagedType) Resolve() (dtype.Atom, error)

func (*UnmanagedType) String added in v0.0.2

func (u *UnmanagedType) String() string

func (*UnmanagedType) WasReferenced added in v0.0.2

func (u *UnmanagedType) WasReferenced() bool

Jump to

Keyboard shortcuts

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