const classafEfan::EfanCompiler
sys::Obj afEfan::EfanCompiler
Compiles efan templates into Fantom code; maybe used outside of afIoc.
- compile
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
const Str ctxVarName := "ctx"
The name given to the
ctx
variable in the render method.- make
new make(|This? in := null)
Create an
EfanCompiler
.- srcCodePadding
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.