unmarshal

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayType

func ArrayType(data []byte) (ast.Node, error)

func BasicLit

func BasicLit(data []byte) (ast.Node, error)

func BlockPointerType added in v0.5.1

func BlockPointerType(data []byte) (ast.Node, error)

func BuiltinType

func BuiltinType(data []byte) (ast.Node, error)

func EnumItem

func EnumItem(data []byte) (ast.Node, error)

func EnumType

func EnumType(data []byte) (ast.Node, error)

func EnumTypeDecl

func EnumTypeDecl(data []byte) (ast.Node, error)

func Field

func Field(data []byte) (ast.Node, error)

func FieldList

func FieldList(data []byte) (ast.Node, error)

func File

func File(data []byte) (*ast.File, error)

func FuncDecl

func FuncDecl(data []byte) (ast.Node, error)

func FuncType

func FuncType(data []byte) (ast.Node, error)

func Ident

func Ident(data []byte) (ast.Node, error)

func Include

func Include(data []byte) (ast.Node, error)

func LvalueRefType

func LvalueRefType(data []byte) (ast.Node, error)

func Macro

func Macro(data []byte) (ast.Node, error)

func Node

func Node(data []byte) (ast.Node, error)

func PointerType

func PointerType(data []byte) (ast.Node, error)

func RecordType

func RecordType(data []byte) (ast.Node, error)

func RvalueRefType

func RvalueRefType(data []byte) (ast.Node, error)

func ScopingExpr

func ScopingExpr(data []byte) (ast.Node, error)

func TagExpr

func TagExpr(data []byte) (ast.Node, error)

func Token

func Token(data []byte) (ast.Node, error)

func TypeDecl

func TypeDecl(data []byte) (ast.Node, error)

func TypeDefDecl

func TypeDefDecl(data []byte) (ast.Node, error)

func Variadic

func Variadic(data []byte) (ast.Node, error)

func XType

func XType(data []byte, xType ast.Node) (ast.Node, error)

Types

type DeserializeError

type DeserializeError struct {
	Func       string // function name
	TargetType any
	Field      string // optional, only for unmarshal node in a struct
	Data       string // origin raw json data
	Err        error  // unmarshal error message
}

DeserializeError represents an error that occurs during json.Unmarshal. It provides context about where the error occurred and what was being unmarshaled.

func (*DeserializeError) Error

func (e *DeserializeError) Error() string

type NodeUnmarshaler

type NodeUnmarshaler func(data []byte) (ast.Node, error)

type UnexpectTypeError added in v0.5.1

type UnexpectTypeError struct {
	Func     string
	GotType  any
	WantType any
}

func (*UnexpectTypeError) Error added in v0.5.1

func (e *UnexpectTypeError) Error() string

Jump to

Keyboard shortcuts

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