Documentation
¶
Index ¶
- type ArrayType
- type ChanType
- type Field
- type FuncIOParam
- func (fio *FuncIOParam) Expr(imports *Imports) string
- func (fio *FuncIOParam) ExprWithName(imports *Imports, defaultName string) string
- func (f *FuncIOParam) IsNamed() bool
- func (fio *FuncIOParam) IsOpaque() bool
- func (f *FuncIOParam) ParamNameOr(defaultValue string) string
- func (fio *FuncIOParam) Require() []string
- type FuncType
- type ImportStatment
- type Imports
- type InterfaceType
- type MapType
- type Method
- type NamedType
- type Namespace
- type Package
- type ParseContext
- type ParseError
- type PointerType
- type SliceType
- type StructType
- type Type
- type TypeConstraint
- type TypeDecl
- type TypeDeclarations
- type TypeParam
- type TypeUnion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncIOParam ¶
func (*FuncIOParam) Expr ¶
func (fio *FuncIOParam) Expr(imports *Imports) string
func (*FuncIOParam) ExprWithName ¶
func (fio *FuncIOParam) ExprWithName(imports *Imports, defaultName string) string
func (*FuncIOParam) IsNamed ¶
func (f *FuncIOParam) IsNamed() bool
func (*FuncIOParam) IsOpaque ¶ added in v0.3.0
func (fio *FuncIOParam) IsOpaque() bool
func (*FuncIOParam) ParamNameOr ¶
func (f *FuncIOParam) ParamNameOr(defaultValue string) string
func (*FuncIOParam) Require ¶
func (fio *FuncIOParam) Require() []string
type FuncType ¶
type FuncType struct {
Args []*FuncIOParam
VarArg *FuncIOParam
Returns []*FuncIOParam
}
type ImportStatment ¶ added in v0.4.0
type Imports ¶ added in v0.4.0
type Imports struct {
// contains filtered or unexported fields
}
func (*Imports) Slice ¶ added in v0.4.0
func (imp *Imports) Slice() []ImportStatment
type InterfaceType ¶
func (*InterfaceType) Expr ¶
func (i *InterfaceType) Expr(imports *Imports) string
func (*InterfaceType) Inlined ¶ added in v0.4.0
func (in *InterfaceType) Inlined(bc ParseContext) (*InterfaceType, error)
func (*InterfaceType) IsOpaque ¶ added in v0.3.0
func (in *InterfaceType) IsOpaque() bool
func (*InterfaceType) PlainName ¶
func (*InterfaceType) PlainName() string
func (*InterfaceType) Require ¶
func (in *InterfaceType) Require() []string
type NamedType ¶
func (*NamedType) TypeParams ¶
type Package ¶ added in v0.4.0
type Package struct {
DefaultName string
Path string
Src string
Types *TypeDeclarations
}
type ParseContext ¶ added in v0.4.0
type ParseContext interface {
Import(importPath string) (*Package, error)
ImportDir(pkgDir string) (*Package, error)
}
func New ¶ added in v0.4.0
func New() (ParseContext, error)
type ParseError ¶ added in v0.4.0
type ParseError struct {
// contains filtered or unexported fields
}
func (*ParseError) Error ¶ added in v0.4.0
func (pe *ParseError) Error() string
func (*ParseError) Expr ¶ added in v0.4.0
func (*ParseError) Expr(*Imports) string
func (*ParseError) IsOpaque ¶ added in v0.4.0
func (pe *ParseError) IsOpaque() bool
func (*ParseError) Require ¶ added in v0.4.0
func (pe *ParseError) Require() []string
func (*ParseError) TypeParams ¶ added in v0.4.0
func (pe *ParseError) TypeParams() []*TypeParam
type PointerType ¶
type PointerType struct {
Elem Type
}
func (*PointerType) Expr ¶
func (ptr *PointerType) Expr(imports *Imports) string
func (*PointerType) IsOpaque ¶ added in v0.3.0
func (ptr *PointerType) IsOpaque() bool
func (*PointerType) Require ¶
func (ptr *PointerType) Require() []string
type StructType ¶
type StructType struct {
Fields []*Field
}
func (*StructType) Expr ¶
func (l *StructType) Expr(imports *Imports) string
func (*StructType) IsOpaque ¶ added in v0.3.0
func (s *StructType) IsOpaque() bool
func (*StructType) PlainName ¶
func (s *StructType) PlainName() string
func (*StructType) Require ¶
func (s *StructType) Require() []string
type TypeConstraint ¶
func (*TypeConstraint) Expr ¶
func (tc *TypeConstraint) Expr(imports *Imports) string
func (*TypeConstraint) IsOpaque ¶ added in v0.3.0
func (tc *TypeConstraint) IsOpaque() bool
func (*TypeConstraint) Require ¶
func (tc *TypeConstraint) Require() []string
type TypeDecl ¶ added in v0.4.0
type TypeDecl[B Type] struct { DefinedIn string ImportPath string Name string TypeParams []*TypeParam Body B }
func (*TypeDecl[B]) GenericExpr ¶ added in v0.5.0
func (*TypeDecl[B]) InstantiateName ¶ added in v0.5.0
type TypeDeclarations ¶
type TypeDeclarations struct {
Structs maps.OrderedMap[string, *TypeDecl[*StructType]]
Interfaces maps.OrderedMap[string, *TypeDecl[*InterfaceType]]
Funcs maps.OrderedMap[string, *TypeDecl[*FuncType]]
Names maps.OrderedMap[string, *TypeDecl[*NamedType]]
Maps maps.OrderedMap[string, *TypeDecl[*MapType]]
Slices maps.OrderedMap[string, *TypeDecl[*SliceType]]
Arrays maps.OrderedMap[string, *TypeDecl[*ArrayType]]
Unresolved maps.OrderedMap[string, *TypeDecl[*unknwonType]]
}
func (*TypeDeclarations) Merge ¶ added in v0.4.0
func (tds *TypeDeclarations) Merge(other *TypeDeclarations)
Merge merges other into tds
Click to show internal directories.
Click to hide internal directories.