ncimpl

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	PkgName string

	FileMap map[string]*llconfig.FileInfo
	ConvSym func(name *ast.Object, mangleName string) (goName string, err error)

	// CfgFile   string // llcppg.cfg
	Pubs           map[string]string
	TrimPrefixes   []string
	KeepUnderScore bool
	// contains filtered or unexported fields
}

func (*Converter) ConvDecl

func (p *Converter) ConvDecl(file string, decl ast.Decl) (goName, goFile string, err error)

func (*Converter) ConvEnumItem

func (p *Converter) ConvEnumItem(decl *ast.EnumTypeDecl, item *ast.EnumItem) (goName string, err error)

func (*Converter) ConvMacro

func (p *Converter) ConvMacro(file string, macro *ast.Macro) (goName, goFile string, err error)

func (*Converter) ConvTagExpr

func (p *Converter) ConvTagExpr(cname string) string

func (*Converter) IsPublic

func (p *Converter) IsPublic(cname string) bool

func (*Converter) Lookup

func (p *Converter) Lookup(name string) (locFile string, ok bool)

type HeaderFile

type HeaderFile struct {
	File     string
	FileType llcppg.FileType
}

func NewHeaderFile

func NewHeaderFile(file string, fileType llcppg.FileType) *HeaderFile

func (*HeaderFile) InCurPkg

func (p *HeaderFile) InCurPkg() bool

func (*HeaderFile) ToGoFileName

func (p *HeaderFile) ToGoFileName(pkgName string) string

Note:third hfile should not set to gogen.Package

type NameMethod

type NameMethod func(name string) string

type ThirdTypeLoc

type ThirdTypeLoc struct {
	// contains filtered or unexported fields
}

func (*ThirdTypeLoc) Add

func (p *ThirdTypeLoc) Add(ident *ast.Ident, loc *ast.Location)

func (*ThirdTypeLoc) Lookup

func (p *ThirdTypeLoc) Lookup(name string) (string, bool)

Jump to

Keyboard shortcuts

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