const classafEfan::EfanCompiler

sys::Obj
  afEfan::EfanCompiler

Compiles efan templates into Fantom code; maybe used outside of afIoc.

compile

Source

EfanRenderer compile(Uri srcLocation, Str efanTemplate, Type? ctxType, Type[] viewHelpers := Type[])Type#.emptyList()

Compiles a new renderer from the given efanTemplate. This method compiles a new Fantom Type so use judiciously to avoid memory leaks. srcLocation is only used for Err msgs.

ctxVarName

Source

const Str ctxVarName := "ctx"

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

make

Source

new make(|This? in := null)

Create an EfanCompiler.

srcCodePadding

Source

const Int srcCodePadding := 5

When generating code snippets to report compilation Errs, this is the number of lines of src code the erroneous line should be padded with.