const classafEfan::EfanCompiler
sys::Obj afEfan::EfanCompiler
Compiles an efan template into a method on a Fantom type.
Plastic is used to generate and compile the Fantom source.
- compile
EfanMeta compile(Uri templateLoc, Str templateSrc, Type? ctxType := null, Type[] viewHelpers := Type#.emptyList())Compiles and instantiates a new
EfanMetainstance from the given efan template. The compiled template extends the given view helper mixins.This method compiles a new Fantom Type so use judiciously to avoid memory leaks.
Note that
templateLocis only used for reporting Err msgs.- ctxName
const Str ctxName := "ctx"The name given to the
ctxvariable in the render method.- make
new make(|This? in := null)Standard it-block ctor for setting fields.
- renderMethodName
const Str renderMethodName := "_efanRender"The name of created render methods.
- templateTypeNameFn
const |Type[]->Str templateTypeNameFn := |Type[]->Str| { ... }Generates the type name given to compiled efan template instances.