Documentation ¶
Index ¶
- func ComposableLatestMajorsOrXJenny(parentdir string, useParentDirOnly bool, ...) codejen.OneToMany[kindsys.Composable]
- func LatestJenny(parentdir string, inner codejen.OneToOne[codegen.SchemaForGen]) codegen.OneToOne
- func Prefixer(prefix string) codejen.FileMapper
- func SlashHeaderMapper(maingen string) codejen.FileMapper
- type TargetJennies
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposableLatestMajorsOrXJenny ¶
func ComposableLatestMajorsOrXJenny(parentdir string, useParentDirOnly bool, inner codejen.OneToOne[codegen.SchemaForGen]) codejen.OneToMany[kindsys.Composable]
TODO remove this once there's a standard jenny for this...somewhere in core.
func LatestJenny ¶
LatestJenny returns a jenny that runs another jenny for only the latest schema in a DefForGen, and prefixes the resulting file with the provided parentdir (e.g. "pkg/kinds/"). TODO remove this once there's a standard jenny for this...somewhere in core.
func Prefixer ¶
func Prefixer(prefix string) codejen.FileMapper
Prefixer returns a FileMapper that injects the provided path prefix to files passed through it.
func SlashHeaderMapper ¶
func SlashHeaderMapper(maingen string) codejen.FileMapper
SlashHeaderMapper produces a FileMapper that injects a comment header onto a codejen.File indicating the main generator that produced it (via the provided maingen, which should be a path) and the jenny or jennies that constructed the file.
Types ¶
type TargetJennies ¶
type TargetJennies struct { Core *codejen.JennyList[kindsys.Kind] Composable *codejen.JennyList[kindsys.Composable] }
TargetJennies is a set of jennies for a particular target language or tool that perform all necessary code generation steps.
func NewTargetJennies ¶
func NewTargetJennies() TargetJennies
NewTargetJennies initializes a new TargetJennies with appropriate namers for each JennyList.