cl

package
v0.7.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DbgFlagAll = convert.DbgFlagAll

Variables

This section is empty.

Functions

func ModInit

func ModInit(deps []string, outputDir string, modulePath string) error

func SetDebug

func SetDebug(flag int)

Types

type Config

type Config struct {
	// Fset provides source position information for syntax trees and types.
	// If Fset is nil, Load will use a new fileset, but preserve Fset's value.
	Fset *token.FileSet

	// An Importer resolves import paths to Packages.
	Importer types.Importer
}

type ConvConfig

type ConvConfig struct {
	OutputDir string
	PkgPath   string
	PkgName   string
	Pkg       *ast.File
	NC        nc.NodeConverter

	Deps []string // dependent packages
	Libs string   // $(pkg-config --libs xxx)
}

type Package

type Package struct {
	*gogen.Package
	*convert.PkgInfo // TODO(xsw): check
}

func Convert

func Convert(config *ConvConfig) (pkg Package, err error)

func NewPackage

func NewPackage(pkgPath, pkgName string, file *ast.File, conf *Config) (pkg Package, err error)

NewPackage create a Go package from C/C++ header files AST. All the C/C++ header files have been parsed and merged into a single AST.

Directories

Path Synopsis
internal
convert
This file is used to convert type from ast type to types.Type
This file is used to convert type from ast type to types.Type
nc

Jump to

Keyboard shortcuts

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