bytecodes

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamTypeSubparam     ParamType = "SUBP"
	ParamTypeNumberParams           = "PARNO"
	ParamTypeLabel                  = "PARLAB"
	ParamTypeValues                 = "PARVALUES"
	ParamTypeInt8                   = "PAR8"
	ParamTypeInt16                  = "PAR16"
	ParamTypeInt32                  = "PAR32"
	ParamTypeFloat                  = "PARF"
	ParamTypeString                 = "PARS"
	ParamTypeVariable               = "PARV"
	ParamTypeHandle                 = "PARH"
)
View Source
const (
	DirectionIn    Direction = "in"
	DirectionOut             = "out"
	DirectionInOut           = "inout"
)
View Source
const (
	SupportTypeOfficial SupportType = "official"
	SupportTypeXtended              = "xtended"
	SupportTypeCompat               = "compat"
)

Variables

This section is empty.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir added in v1.4.0

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo added in v1.4.0

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames added in v1.4.0

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset added in v1.4.0

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset added in v1.4.0

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets added in v1.4.0

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func Scope

func Scope(name string, support SupportType) (*ast.Scope, error)

Types

type Command

type Command struct {
	Desc    string ",omitempty"
	Value   uint8
	Params  []Param
	Support *Support ",omitempty"
	Remarks string   ",omitempty"
}

type Define

type Define struct {
	Desc    string ",omitempty"
	Value   interface{}
	Support *Support ",omitempty"
	Remarks string   ",omitempty"
}

type Defs

type Defs struct {
	Defines map[string]Define
	Enums   map[string]Enum
	Ops     map[string]Opcode
}

func GetDefs

func GetDefs(name string) (defs Defs, err error)

type Direction added in v1.5.0

type Direction string

type Enum

type Enum struct {
	Desc    string ",omitempty"
	Members map[string]EnumMember
	Support *Support ",omitempty"
	Remarks string   ",omitempty"
}

type EnumMember

type EnumMember struct {
	Desc    string ",omitempty"
	Value   int32
	Support *Support ",omitempty"
	Remarks string   ",omitempty"
}

type Opcode

type Opcode struct {
	Desc    string ",omitempty"
	Value   uint8
	Params  []Param
	Support *Support ",omitempty"
	Remarks string   ",omitempty"
}

type Param

type Param struct {
	Name        string
	Desc        string ",omitempty"
	Type        ParamType
	ElementType ParamType "element-type,omitempty"
	Dir         Direction
	Commands    map[string]Command ",omitempty"
	Enum        *Enum              ",omitempty"
	Remarks     string             ",omitempty"
}

type ParamType

type ParamType string

type Support

type Support struct {
	Official bool
	Xtended  bool
	Compat   bool
}

func (*Support) Check

func (s *Support) Check(v SupportType) bool

type SupportType added in v1.1.0

type SupportType string

func (SupportType) CommandLookup added in v1.2.0

func (s SupportType) CommandLookup(cmds map[string]Command) map[uint8]string

func (SupportType) EnumLookup added in v1.2.0

func (s SupportType) EnumLookup(ems map[string]EnumMember) map[int32]string

func (SupportType) OpcodeLookup added in v1.2.0

func (s SupportType) OpcodeLookup(ops map[string]Opcode) map[uint8]string

Jump to

Keyboard shortcuts

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