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 TypeFuncDecl
- type TypeInterfaceDecl
- type TypeNameDecl
- type TypeParam
- type TypeStructDecl
- type TypeUnion
- type TypeUnresolvedDecl
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 TypeDeclarations ¶
type TypeDeclarations struct { Structs maps.OrderedMap[string, *TypeStructDecl] Interfaces maps.OrderedMap[string, *TypeInterfaceDecl] Funcs maps.OrderedMap[string, *TypeFuncDecl] Names maps.OrderedMap[string, *TypeNameDecl] Unresolved maps.OrderedMap[string, *TypeUnresolvedDecl] }
func (*TypeDeclarations) Merge ¶ added in v0.4.0
func (td *TypeDeclarations) Merge(other *TypeDeclarations)
type TypeFuncDecl ¶
type TypeFuncDecl struct { DefinedIn string ImportPath string Name string TypeParams []*TypeParam Body *FuncType }
func (*TypeFuncDecl) Expr ¶
func (fn *TypeFuncDecl) Expr(imports *Imports) string
func (*TypeFuncDecl) GenericExpr ¶
func (fn *TypeFuncDecl) GenericExpr(imports *Imports, backtype bool) string
func (*TypeFuncDecl) IsOpaque ¶ added in v0.3.0
func (fn *TypeFuncDecl) IsOpaque() bool
func (*TypeFuncDecl) PlainName ¶
func (fn *TypeFuncDecl) PlainName() string
func (*TypeFuncDecl) Require ¶
func (fn *TypeFuncDecl) Require() []string
type TypeInterfaceDecl ¶
type TypeInterfaceDecl struct { DefinedIn string ImportPath string Name string TypeParams []*TypeParam Body *InterfaceType }
func (*TypeInterfaceDecl) Expr ¶
func (s *TypeInterfaceDecl) Expr(imports *Imports) string
func (*TypeInterfaceDecl) GenericExpr ¶
func (s *TypeInterfaceDecl) GenericExpr(imports *Imports, backtype bool) string
func (*TypeInterfaceDecl) IsOpaque ¶ added in v0.3.0
func (in *TypeInterfaceDecl) IsOpaque() bool
func (*TypeInterfaceDecl) PlainName ¶
func (s *TypeInterfaceDecl) PlainName() string
func (*TypeInterfaceDecl) Require ¶
func (s *TypeInterfaceDecl) Require() []string
type TypeNameDecl ¶ added in v0.4.0
type TypeNameDecl struct { DefinedIn string ImportPath string Name string TypeParams []*TypeParam Body *NamedType }
func (*TypeNameDecl) Expr ¶ added in v0.4.0
func (n *TypeNameDecl) Expr(imports *Imports) string
func (*TypeNameDecl) GenericExpr ¶ added in v0.4.0
func (n *TypeNameDecl) GenericExpr(imports *Imports, backtype bool) string
func (*TypeNameDecl) IsOpaque ¶ added in v0.4.0
func (fn *TypeNameDecl) IsOpaque() bool
func (*TypeNameDecl) Require ¶ added in v0.4.0
func (n *TypeNameDecl) Require() []string
type TypeStructDecl ¶
type TypeStructDecl struct { DefinedIn string ImportPath string Name string TypeParams []*TypeParam Body *StructType }
func (*TypeStructDecl) Expr ¶
func (s *TypeStructDecl) Expr(imports *Imports) string
func (*TypeStructDecl) GenericExpr ¶
func (s *TypeStructDecl) GenericExpr(imports *Imports, backtype bool) string
func (*TypeStructDecl) InstantiateName ¶ added in v0.4.0
func (s *TypeStructDecl) InstantiateName(typeParams []Type) *NamedType
func (*TypeStructDecl) IsOpaque ¶ added in v0.3.0
func (s *TypeStructDecl) IsOpaque() bool
func (*TypeStructDecl) Require ¶
func (s *TypeStructDecl) Require() []string
type TypeUnresolvedDecl ¶ added in v0.4.0
type TypeUnresolvedDecl struct { DefinedIn string ImportPath string Name string TypeParams []*TypeParam Body *unknwonType }
func (*TypeUnresolvedDecl) Expr ¶ added in v0.4.0
func (n *TypeUnresolvedDecl) Expr(imports *Imports) string
func (*TypeUnresolvedDecl) GenericExpr ¶ added in v0.4.0
func (n *TypeUnresolvedDecl) GenericExpr(imports *Imports, backtype bool) string
func (*TypeUnresolvedDecl) IsOpaque ¶ added in v0.4.0
func (fn *TypeUnresolvedDecl) IsOpaque() bool
func (*TypeUnresolvedDecl) Require ¶ added in v0.4.0
func (n *TypeUnresolvedDecl) Require() []string
Click to show internal directories.
Click to hide internal directories.