parser

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasicSizes = map[string]uint64{
	"bool":       uint64(unsafe.Sizeof(true)),
	"int8":       uint64(unsafe.Sizeof(int8(0))),
	"uint8":      uint64(unsafe.Sizeof(uint8(0))),
	"byte":       uint64(unsafe.Sizeof(byte(0))),
	"int16":      uint64(unsafe.Sizeof(int16(0))),
	"uint16":     uint64(unsafe.Sizeof(uint16(0))),
	"int32":      uint64(unsafe.Sizeof(int32(0))),
	"uint32":     uint64(unsafe.Sizeof(uint32(0))),
	"rune":       uint64(unsafe.Sizeof(rune(0))),
	"float32":    uint64(unsafe.Sizeof(float32(0))),
	"int":        uint64(unsafe.Sizeof(int(0))),
	"uint":       uint64(unsafe.Sizeof(uint(0))),
	"int64":      uint64(unsafe.Sizeof(int64(0))),
	"uint64":     uint64(unsafe.Sizeof(uint64(0))),
	"float64":    uint64(unsafe.Sizeof(float64(0))),
	"uintptr":    uint64(unsafe.Sizeof(uintptr(0))),
	"complex64":  uint64(unsafe.Sizeof(complex64(0))),
	"complex128": uint64(unsafe.Sizeof(complex128(0))),
	"string":     uint64(unsafe.Sizeof("")),
}
View Source
var FixedSizes = map[string]uint64{
	"ptr":   uint64(unsafe.Sizeof(&struct{}{})),
	"map":   uint64(unsafe.Sizeof(map[bool]bool{})),
	"slice": uint64(unsafe.Sizeof([]struct{}{})),
	"chan":  uint64(unsafe.Sizeof(make(chan struct{}))),
	"func":  uint64(unsafe.Sizeof(func() {})),
}

Functions

This section is empty.

Types

type TypeInfo

type TypeInfo struct {
	Sizeof   uint64
	Alignof  uint64
	Name     string
	IsFixed  bool
	IsArray  bool
	IsStruct bool
	Fields   []*TypeInfo
}

func ParseCode

func ParseCode(code string) (*TypeInfo, error)

Jump to

Keyboard shortcuts

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