blob: 902d91bd21149d359418c0af575b2fe708a98d19 [file] [log] [blame]
////////////////////////////////////////////////////////////////////////////////
// Do not modify!
// Generated by codergen
////////////////////////////////////////////////////////////////////////////////
package parse
import (
"fmt"
"android.googlesource.com/platform/tools/gpu/binary/schema"
)
var ConstantValues schema.Constants
var _NumberKind_map = map[NumberKind]string{}
func init() {
_NumberKind_map[0] = "NotNumeric"
_NumberKind_map[1] = "Decimal"
_NumberKind_map[2] = "Octal"
_NumberKind_map[3] = "Hexadecimal"
_NumberKind_map[4] = "Floating"
_NumberKind_map[5] = "Scientific"
ConstantValues = append(ConstantValues, schema.ConstantSet{
Type: &schema.Primitive{Name: "NumberKind", Method: schema.Uint8},
Entries: []schema.Constant{
{Name: "NotNumeric", Value: uint8(0)},
{Name: "Decimal", Value: uint8(1)},
{Name: "Octal", Value: uint8(2)},
{Name: "Hexadecimal", Value: uint8(3)},
{Name: "Floating", Value: uint8(4)},
{Name: "Scientific", Value: uint8(5)},
},
})
}
func (v NumberKind) String() string {
if s, ok := _NumberKind_map[v]; ok {
return s
}
return fmt.Sprintf("NumberKind(%d)", v)
}
func (v *NumberKind) Parse(s string) error {
for k, t := range _NumberKind_map {
if s == t {
*v = k
return nil
}
}
return fmt.Errorf("%s not in NumberKind", s)
}
var _SkipMode_map = map[SkipMode]string{}
func init() {
_SkipMode_map[0] = "SkipPrefix"
_SkipMode_map[1] = "SkipSuffix"
ConstantValues = append(ConstantValues, schema.ConstantSet{
Type: &schema.Primitive{Name: "SkipMode", Method: schema.Int32},
Entries: []schema.Constant{
{Name: "SkipPrefix", Value: int32(0)},
{Name: "SkipSuffix", Value: int32(1)},
},
})
}
func (v SkipMode) String() string {
if s, ok := _SkipMode_map[v]; ok {
return s
}
return fmt.Sprintf("SkipMode(%d)", v)
}
func (v *SkipMode) Parse(s string) error {
for k, t := range _SkipMode_map {
if s == t {
*v = k
return nil
}
}
return fmt.Errorf("%s not in SkipMode", s)
}