tokens

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join added in v0.1.8

func Join(tokens []*TypeToken, f func(t *TypeToken) string) string

Types

type FuncToken added in v0.1.8

type FuncToken struct {
	Signature string
	Args      []*TypeToken
	Rets      []*TypeToken
}

func (FuncToken) Call added in v0.1.8

func (ft FuncToken) Call(importingPkg string, tok token.Token) string

func (FuncToken) Pkg added in v0.1.8

func (ft FuncToken) Pkg() string

type TypeToken

type TypeToken struct {
	FullSignature  string
	Name           string
	Signature      string // temp export
	IsPtr, IsSlice bool
	VarType        *types.Var
}

func NewTypeToken

func NewTypeToken(signature, name string) *TypeToken

func (TypeToken) ArgDeclaration added in v0.1.8

func (tt TypeToken) ArgDeclaration(importingPkg string) string

func (TypeToken) DeclSignature

func (tt TypeToken) DeclSignature(importingPkg string) string

func (TypeToken) NewInstance

func (tt TypeToken) NewInstance(importingPkg string) string

func (TypeToken) SameType

func (tt TypeToken) SameType(t types.Type, strict bool) bool

func (TypeToken) SimpleSignature

func (tt TypeToken) SimpleSignature(importingPkg string) string

returns declaration signature without pointer details

func (TypeToken) String

func (tt TypeToken) String() string

func (TypeToken) VarName

func (tt TypeToken) VarName() string

Jump to

Keyboard shortcuts

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