outline

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOverload

func CheckOverload(obj types.Object) (name string, fn *types.Func, ok bool)

Types

type All

type All struct {
	Consts []Const
	Vars   []Var
	Funcs  []Func
	Types  []*TypeName

	Package
	// contains filtered or unexported fields
}

type Config

type Config struct {
	// Fset provides source position information for syntax trees and types.
	// If Fset is nil, Load will use a new fileset, but preserve Fset's value.
	Fset *token.FileSet

	// C2goBase specifies base of standard c2go packages.
	// Default is github.com/goplus/.
	C2goBase string

	// LookupPub lookups the c2go package pubfile (named c2go.a.pub).
	LookupPub func(pkgPath string) (pubfile string, err error)

	// LookupClass lookups a class by specified file extension.
	LookupClass func(ext string) (c *Project, ok bool)

	// An Importer resolves import paths to Packages.
	Importer types.Importer
}

type Const

type Const struct {
	*types.Const
}

func (Const) Doc

func (p Const) Doc() string

func (Const) Obj

func (p Const) Obj() types.Object

type Func

type Func struct {
	*types.Func
	// contains filtered or unexported fields
}

func (Func) Doc

func (p Func) Doc() string

func (Func) Obj

func (p Func) Obj() types.Object

type Named

type Named struct {
	*types.Named
	// contains filtered or unexported fields
}

func (Named) Methods

func (p Named) Methods() []Func

type Package

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

func NewPackage

func NewPackage(pkgPath string, pkg *ast.Package, conf *Config) (_ Package, err error)

NewPackage creates a Go/Go+ outline package.

func (Package) Outline

func (p Package) Outline(withUnexported ...bool) (ret *All)

func (Package) Pkg

func (p Package) Pkg() *types.Package

func (Package) Valid

func (p Package) Valid() bool

type Project

type Project = modfile.Project

type Type

type Type struct {
	types.Type
}

func (Type) CheckNamed

func (p Type) CheckNamed(pkg Package) (_ Named, ok bool)

type TypeName

type TypeName struct {
	*types.TypeName
	Consts    []Const
	Creators  []Func
	GoptFuncs []Func
	Helpers   []Func
	// contains filtered or unexported fields
}

func (*TypeName) Doc

func (p *TypeName) Doc() string

func (*TypeName) IsUsed

func (p *TypeName) IsUsed() bool

func (*TypeName) Obj

func (p *TypeName) Obj() types.Object

func (*TypeName) ObjWith

func (p *TypeName) ObjWith(all bool) *types.TypeName

func (*TypeName) Type

func (p *TypeName) Type() Type

type Var

type Var struct {
	*types.Var
}

func (Var) Doc

func (p Var) Doc() string

func (Var) Obj

func (p Var) Obj() types.Object

Jump to

Keyboard shortcuts

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