defs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(packagePath, relative string, implicit bool) (def.Definition, error)

File constructor

NOTE: implicit includes are files that have been added during the process, that have no representation in the source code (e.g. preact := js.File("./preact.js")) you shouldn't need this option unless you're working on the compiler

func Function

func Function(index *index.Index, info *loader.PackageInfo, n *ast.FuncDecl) (def.Definition, error)

Function fn

func Interface

func Interface(index *index.Index, info *loader.PackageInfo, gn *ast.GenDecl, n *ast.TypeSpec) (def.Definition, error)

Interface fn

func Method

func Method(index *index.Index, info *loader.PackageInfo, n *ast.FuncDecl) (def.Definition, error)

Method fn

func Struct

func Struct(index *index.Index, info *loader.PackageInfo, gn *ast.GenDecl, n *ast.TypeSpec) (def.Definition, error)

Struct fn

func Type

func Type(index *index.Index, info *loader.PackageInfo, gn *ast.GenDecl, n *ast.TypeSpec) (def.Definition, error)

Type fn

func Value

func Value(index *index.Index, info *loader.PackageInfo, gn *ast.GenDecl, n *ast.ValueSpec) (def.Definition, error)

Value fn

Types

type Filer

type Filer interface {
	def.Definition
	Implicit() bool
}

Filer interface

type Functioner

type Functioner interface {
	def.Definition
	IsAsync() (bool, error)
	IsVariadic() bool
	Node() *ast.FuncDecl
	Rewrite() def.Rewrite
	Params() []string
	Results() []def.FunctionResult
}

Functioner interface

type Interfacer

type Interfacer interface {
	def.Definition
	ImplementedBy(method string) []Methoder
	DependenciesOf(method string) ([]def.Definition, error)
	Node() *ast.TypeSpec
	Methods() []def.InterfaceMethod
	FindMethod(name string) def.InterfaceMethod
}

Interfacer method

type Methoder

type Methoder interface {
	Functioner
	Recv() Structer
}

Methoder interface

type Structer

type Structer interface {
	def.Definition
	Gen() *ast.GenDecl
	Node() *ast.TypeSpec
	Fields() []*field
	Field(name string) *field
	Methods() []def.Definition
	Implements() ([]Interfacer, error)
}

Structer interface

type Typer

type Typer interface {
	def.Definition
	Gen() *ast.GenDecl
	Node() *ast.TypeSpec
	Transform(n ast.Expr) (ast.Expr, error)
	Methods() []def.Definition
	Implements() ([]def.Definition, error)
}

Typer interface

type Valuer

type Valuer interface {
	def.Definition

	Params() []string
	Rewrite() def.Rewrite
	IsVariadic() bool
	Node() *ast.ValueSpec
}

Valuer interface

Jump to

Keyboard shortcuts

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