diff --git a/ent/atoms.go b/ent/atoms.go index e4c38d6..9fa2d8f 100644 --- a/ent/atoms.go +++ b/ent/atoms.go @@ -26,6 +26,9 @@ var atom_types = map[string]typeFn{ "int32": func(r bit.Reader) (value, error) { return bit.ReadZigZag32(r), r.Err() }, + "CUtlStringToken": func(r bit.Reader) (value, error) { + return bit.ReadVarInt(r), r.Err() + }, } func atomType(spec *typeSpec, env *Env) tÿpe { diff --git a/ent/string.go b/ent/string.go deleted file mode 100644 index 63aca57..0000000 --- a/ent/string.go +++ /dev/null @@ -1,14 +0,0 @@ -package ent - -import ( - "github.com/jordanorelli/hyperstone/bit" -) - -func stringType(spec *typeSpec, env *Env) tÿpe { - if spec.typeName != "CUtlStringToken" { - return nil - } - return typeFn(func(r bit.Reader) (value, error) { - return bit.ReadVarInt(r), r.Err() - }) -} diff --git a/ent/type.go b/ent/type.go index e78a6bc..62c6b23 100644 --- a/ent/type.go +++ b/ent/type.go @@ -32,7 +32,7 @@ func parseTypeSpec(spec *typeSpec, env *Env) tÿpe { } return nil } - return coalesce(atomType, floatType, handleType, qAngleType, hSeqType, genericType, stringType) + return coalesce(atomType, floatType, handleType, qAngleType, hSeqType, genericType) } // a type error is both an error and a type. It represents a type that we were