Files
dolt/nomdl/codegen/enum.tmpl
Erik Arvidsson 72f4cd3a7a NomDL Codegen: Make the TypeRef return a package ref
The TypeRef function for a Noms Struct should be the (Name, PkgRef) and
not the description of the struct fields. This is important because
when serializing we need to write the package ref.

Towards #281 #304
2015-10-05 14:24:25 -07:00

9 lines
159 B
Cheetah

// {{.Name}}
type {{.Name}} uint32
{{$name := .Name}}
const ({{range $index, $id := .Ids}}
{{title $id}}{{if eq $index 0}} {{$name}} = iota{{end}}{{end}}
)