parser

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FlagIsParam = 1 << iota
	FlagIsStructField
	FlagIsExtern
	FlagIsTypedef
	FlagGetRetType
)
View Source
const (
	KindFConst = 1 << iota
	KindFVolatile
	KindFAnonymous
	KindFVariadic
)

Variables

View Source
var (
	ErrInvalidType = errors.New("invalid type")
)

Functions

func IsArrayWithoutLen

func IsArrayWithoutLen(err error) bool

func ParseType

func ParseType(qualType string, conf *Config) (t types.Type, kind int, err error)

qualType can be:

  • unsigned int
  • struct ConstantString
  • volatile uint32_t
  • int (*)(void *, int, char **, char **)
  • int (*)(const char *, ...)
  • int (*)(void)
  • void (*(int, void (*)(int)))(int)
  • const char *restrict
  • const char [7]
  • char *
  • void
  • ...

Types

type Config

type Config struct {
	ParseEnv
	Scope  *types.Scope
	Anonym types.Type
	Flags  int
}

type ParseEnv

type ParseEnv interface {
	Pkg() *types.Package
	Int128() types.Type
	Uint128() types.Type
}

type ParseTypeError

type ParseTypeError struct {
	QualType string
	ErrMsg   string
}

func (*ParseTypeError) Error

func (p *ParseTypeError) Error() string

type TypeNotFound

type TypeNotFound struct {
	Literal       string
	StructOrUnion bool
}

func (*TypeNotFound) Error

func (p *TypeNotFound) Error() string

Jump to

Keyboard shortcuts

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