code

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallGraphTypeStatic  CallGraphType = "static"
	CallGraphTypeCha                   = "cha"
	CallGraphTypeRta                   = "rta"
	CallGraphTypePointer               = "pointer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallGraphMode

type CallGraphMode uint8
const (
	CallGraphFastMode CallGraphMode = iota + 1
	CallGraphDeepMode
)

type CallGraphType

type CallGraphType string

type Handler

type Handler interface {
	NodeHandler(node *Node)
	LinkHandler(link *Link)
}

type Language

type Language interface {
	VisitFile(nodeCB NodeCB, linkCB LinkCB)
	InterfaceImplements(linkCB LinkCB)
	CallGraph(linkCB LinkCB, mode CallGraphMode) error
	MainPkgPath() string
}
type Link struct {
	From     *Node
	To       *Node
	Relation RelationShip
}

type LinkCB

type LinkCB func(link *Link)

type MetaInfo

type MetaInfo interface {
	Pkg() string
	Name() string
	Parent() string
	HasParent() bool
}

type Node

type Node struct {
	Meta   MetaInfo
	Pos    Position
	Parent *Node
	Type   NodeType
}

type NodeCB

type NodeCB func(node *Node)

type NodeType

type NodeType int
const (
	TypeGenIdent NodeType = 1 << iota
	TypeGenFunc
	TypeGenArray
	TypeGenMap
	TypeGenStruct
	TypeGenStructField
	TypeGenStructEmbeddedField
	TypeGenInterface
	TypeGenInterfaceMethod
	TypeFunc
	TypeAny
	TypeNone
)

type Param added in v0.0.3

type Param interface {
	Name() string
}

type Position

type Position interface {
	Filename() string
	Offset() int
	Line() int
	Column() int
}

type RelationShip

type RelationShip int
const (
	OneOne RelationShip = iota + 1
	OneMany
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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