hir

package
v0.0.0-...-ab8d200 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInType

type BuildInType interface {
	Type
	BuildIn()
}

BuildInType 内置类型

type File

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

func NewFile

func NewFile(path stlos.FilePath, pkg *Package) *File

func (*File) AddLinkedPackage

func (self *File) AddLinkedPackage(pkg *Package)

func (*File) AppendGlobal

func (self *File) AppendGlobal(pub bool, g Global) Global

func (*File) Equal

func (self *File) Equal(dst *File) bool

func (*File) GetExternPackage

func (self *File) GetExternPackage(name string) (*Package, bool)

func (*File) GetIdent

func (self *File) GetIdent(name string, allowLinkedPkgs ...bool) (any, bool)

func (*File) GetLinkedPackages

func (self *File) GetLinkedPackages() []*Package

func (*File) Hash

func (self *File) Hash() uint64

func (*File) Package

func (self *File) Package() *Package

func (*File) Path

func (self *File) Path() stlos.FilePath

func (*File) SetExternPackage

func (self *File) SetExternPackage(name string, pkg *Package)

func (*File) SetIdent

func (self *File) SetIdent(name string, ident any) bool

func (*File) String

func (self *File) String() string

type GenericRestraint

type GenericRestraint interface {
	GetMethodType(name string) (Type, bool)
}

GenericRestraint 泛型约束

type Global

type Global interface {
	File() *File
	Package() *Package
	SetFile(file *File)
	Public() bool
	SetPublic(pub bool)
}

type Local

type Local interface {
	Local()
}

type Package

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

func NewPackage

func NewPackage(path stlos.FilePath) *Package

func (*Package) AddFile

func (self *Package) AddFile(file *File)

func (*Package) Equal

func (self *Package) Equal(dst *Package) bool

func (*Package) GetDependencyPackages

func (self *Package) GetDependencyPackages() []*Package

func (*Package) GetIdent

func (self *Package) GetIdent(name string, _ ...bool) (any, bool)

func (*Package) Globals

func (self *Package) Globals() linkedlist.LinkedList[Global]

func (*Package) Hash

func (self *Package) Hash() uint64

func (*Package) IsBuildIn

func (self *Package) IsBuildIn() bool

IsBuildIn 是否是buildin包

func (*Package) IsIn

func (self *Package) IsIn(dst *Package) bool

IsIn 是否处于目标包下

func (*Package) Package

func (self *Package) Package() *Package

func (*Package) Path

func (self *Package) Path() stlos.FilePath

func (*Package) SetIdent

func (self *Package) SetIdent(name string, ident any) bool

func (*Package) String

func (self *Package) String() string

type Type

type Type interface {
	fmt.Stringer
	stlhash.Hashable
	stlcmp.Equalable[Type]
}

Type 类型

type Value

type Value interface {
	Type() Type
	Mutable() bool
	Storable() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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