info

package
v1.0.50 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeclInfo

type DeclInfo struct {
	FuncDecl *syntax.FuncDecl
	VarDecl  *syntax.VarDecl

	// when kind == CONST
	ConstDecl *syntax.ConstDecl

	// is this var decl follow a const __xgo_trap_xxx = 1?
	FollowingTrapConst bool

	Kind         DeclKind
	Name         string
	RecvTypeName string
	RecvPtr      bool
	Generic      bool
	Closure      bool
	Stdlib       bool

	// this is an interface type declare
	// only the RecvTypeName is valid
	Interface bool

	// arg names
	RecvName     string
	ArgNames     []string
	ResNames     []string
	FirstArgCtx  bool
	LastResError bool

	FileSyntax *syntax.File
	FileIndex  int

	// this is file name after applied -trimpath
	File string
	Line int
}

func (*DeclInfo) FuncName added in v1.0.43

func (c *DeclInfo) FuncName() string

func (*DeclInfo) GenericName

func (c *DeclInfo) GenericName() string

func (*DeclInfo) IdentityName

func (c *DeclInfo) IdentityName() string

func (*DeclInfo) RefName

func (c *DeclInfo) RefName() string

func (*DeclInfo) RefNameSyntax

func (c *DeclInfo) RefNameSyntax(pos syntax.Pos) syntax.Expr

type DeclKind

type DeclKind int
const (
	Kind_Func   DeclKind = 0
	Kind_Var    DeclKind = 1
	Kind_VarPtr DeclKind = 2
	Kind_Const  DeclKind = 3
)

func (DeclKind) IsFunc

func (c DeclKind) IsFunc() bool

func (DeclKind) IsVarOrConst

func (c DeclKind) IsVarOrConst() bool

func (DeclKind) String

func (c DeclKind) String() string

Jump to

Keyboard shortcuts

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