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

Source

EfanMeta compile(Uri templateLoc, Str templateSrc, Type? ctxType := null, Type[] viewHelpers := Type#.emptyList())

Compiles and instantiates a new EfanMeta instance 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 templateLoc is only used for reporting Err msgs.

compilerCallbacks

Source

const |Type,PlasticClassModel[] compilerCallbacks

Callbacks are called for each compiled model.

ctxName

Source

const Str ctxName := "ctx"

The name given to the ctx variable in the render method.

make

Source

new make(|This? in := null)

Standard it-block ctor for setting fields.

renderMethodName

Source

const Str renderMethodName := "_efan_render"

The name of created render methods.

templateTypeNameFn

Source

const |Type[]->Str templateTypeNameFn := |Type[]->Str| { ... }

Generates the type name given to compiled efan template instances.