jen

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

func LatestJenny(parentdir string, inner codejen.OneToOne[codegen.SchemaForGen]) codegen.OneToOne

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL