cl

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 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 {
	PkgName   string
	SymbFile  string // llcppg.symb.json
	CfgFile   string // llcppg.cfg
	OutputDir string

	Pkg *llconfig.Pkg
}

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

Jump to

Keyboard shortcuts

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