Files
dolt/nomdl/codegen/header.tmpl
Erik Arvidsson d6869cef35 NomDL: Make Package a primitive type
This solves the bootstrapping problems we are encountering.

Previously Package was a Struct but structs depend on Package.
2015-10-20 10:26:00 -04:00

27 lines
658 B
Cheetah

// This file was generated by nomdl/codegen.
package {{.Name}}
{{if .HasImports}}
import (
{{range $imp := .Imports}}"{{$imp}}"
{{end}}
)
{{end}}
{{if .HasTypes}}
var __{{.Name}}PackageInFile_{{.FileID}}_CachedRef = __{{.Name}}PackageInFile_{{.FileID}}_Ref()
// This function builds up a Noms value that describes the type
// package implemented by this file and registers it with the global
// type package definition cache.
func __{{.Name}}PackageInFile_{{.FileID}}_Ref() ref.Ref {
p := types.NewPackage([]types.TypeRef{
{{range $t := .Types}}
{{toTypesTypeRef $t "" ""}},{{end}}
}, []ref.Ref{})
return types.RegisterPackage(&p)
}
{{end}}