symbols

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	Name string
	Type ClassType
	Pos  meta.ElementPosition

	WithExplicitConstructor bool
}

Class is a structure for storing information about a class.

func (*Class) HumanReadableName

func (f *Class) HumanReadableName() string

HumanReadableName returns a string with a name that is understandable.

func (*Class) String

func (f *Class) String() string

type ClassType

type ClassType uint8
const (
	PlainClass ClassType = iota
	Interface
	Trait
)

type Classes

type Classes struct {
	Classes map[string]*Class
	// contains filtered or unexported fields
}

func NewClasses

func NewClasses() *Classes

func (*Classes) Add

func (f *Classes) Add(class *Class)

func (*Classes) Get

func (f *Classes) Get(name string) (*Class, bool)

func (*Classes) Len

func (f *Classes) Len() int

func (*Classes) Raw

func (f *Classes) Raw() map[string]*Class

type Function

type Function struct {
	Name       string
	Type       FunctionType
	Pos        meta.ElementPosition
	NeedRemove bool

	Globals *GlobalVars

	Calls *FunctionCalls

	FunctionsCalls *FunctionCalls

	Called   *Functions
	CalledBy *Functions
}

Function is a structure for storing information about a function.

func (*Function) HumanReadableName

func (f *Function) HumanReadableName() string

HumanReadableName returns a string with a name that is understandable.

func (*Function) String

func (f *Function) String() string

type FunctionArg

type FunctionArg struct {
	Expr ir.Node
}

type FunctionCall

type FunctionCall struct {
	Function *Function
	Position meta.ElementPosition
	Args     []FunctionArg
}

type FunctionCalls

type FunctionCalls struct {
	Calls map[meta.ElementPosition]FunctionCall
	// contains filtered or unexported fields
}

func NewFunctionCalls

func NewFunctionCalls() *FunctionCalls

func (*FunctionCalls) Add

func (c *FunctionCalls) Add(call FunctionCall)

type FunctionType

type FunctionType int64
const (
	MainFunc FunctionType = iota
	LocalFunc
	ExternFunc
)

type Functions

type Functions struct {
	Functions map[string]*Function
	// contains filtered or unexported fields
}

func NewFunctions

func NewFunctions() *Functions

func (*Functions) Add

func (f *Functions) Add(fun *Function)

func (*Functions) Get

func (f *Functions) Get(name string) (*Function, bool)

func (*Functions) Len

func (f *Functions) Len() int

func (*Functions) Raw

func (f *Functions) Raw() map[string]*Function

type GlobalVar

type GlobalVar struct {
	Name     string
	UseCount int64
}

type GlobalVars

type GlobalVars struct {
	GlobalVars map[string]*GlobalVar
	// contains filtered or unexported fields
}

func NewGlobals

func NewGlobals() *GlobalVars

func (*GlobalVars) Add

func (g *GlobalVars) Add(variable *GlobalVar)

func (*GlobalVars) Get

func (g *GlobalVars) Get(name string) (*GlobalVar, bool)

Jump to

Keyboard shortcuts

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