Documentation
¶
Overview ¶
Package compiler
Index ¶
Constants ¶
View Source
const ( LogFieldSourceCodeLen = "sourceCodeLen" LogFieldInsertPosition = "insertPosition" LogFieldCode = "code" LogFieldLength = "length" LogFieldSourceCodeLoaded = "sourceCodeLoaded" )
Variables ¶
This section is empty.
Functions ¶
func IsBashFrameworkFunction ¶
func IsCommentLine ¶
func IsFunctionDirective ¶
Types ¶
type AnnotationProcessorInterface ¶
type AnnotationProcessorInterface interface { GetTitle() string Init(compileContextData *CompileContextData) error Reset() ParseFunction(compileContextData *CompileContextData, functionStruct *functionInfoStruct) error Process(compileContextData *CompileContextData) error PostProcess(compileContextData *CompileContextData, code string) (newCode string, err error) }
func NewEmbedAnnotationProcessor ¶
func NewEmbedAnnotationProcessor() AnnotationProcessorInterface
func NewRequireAnnotationProcessor ¶
func NewRequireAnnotationProcessor() AnnotationProcessorInterface
type CompileContext ¶
type CompileContext struct {
// contains filtered or unexported fields
}
func NewCompiler ¶
func NewCompiler( templateContext render.TemplateContextInterface, annotationProcessors []AnnotationProcessorInterface, ) CompileContext
Compile generates code from given model
func (CompileContext) Compile ¶
func (context CompileContext) Compile( compileContextData *CompileContextData, code string, ) (codeCompiled string, err error)
func (CompileContext) Init ¶
func (context CompileContext) Init( templateContextData *render.TemplateContextData, config *model.CompilerConfig, ) (*CompileContextData, error)
type CompileContextData ¶
type CompileContextData struct {
// contains filtered or unexported fields
}
func (CompileContextData) Validate ¶
func (context CompileContextData) Validate() error
type InsertPosition ¶
type InsertPosition int8
const ( InsertPositionFirst InsertPosition = 0 InsertPositionMiddle InsertPosition = 1 InsertPositionLast InsertPosition = 2 )
Click to show internal directories.
Click to hide internal directories.