Documentation ¶
Overview ¶
Package meta is used to bootstrap the code generator. That is it contains code which generates Go code that gets compiled together with the user design package. The result of that compilation is a tool which generates the final code or documentation consumed by the end-user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct { // Genfunc contains the name of the generator entry point function. // The function signature must be: // // func <Genfunc>([]dslengine.Root) ([]string, error) Genfunc string // Imports list the imports that are specific for that generator that // should be added to the main Go file. Imports []*codegen.ImportSpec // Flags is the list of flags to be used when invoking the final // generator on the command line. Flags map[string]string }
Generator generates the code of, compiles and runs generators. This extra step is necessary to compile in the end user design package so that generator code can iterate through it.
func NewGenerator ¶
func NewGenerator(genfunc string, imports []*codegen.ImportSpec, flags map[string]string) *Generator
NewGenerator returns a meta generator that can run an actual Generator given its factory method and command line flags.
Click to show internal directories.
Click to hide internal directories.