parse( $templateText, \%keyValues )
Example:
$parser->parse( $text, {
'depth' => $depth,
'headline' => $headline,
});
FreeMarker macros like ${depth} are substituted with the value of $depth.
See
http://freemarker.org/docs/ref_directive_if.html
Not implemented:
<#elseif statement>
Not implemented:
nested if statements
See
http://freemarker.org/docs/ref_directive_list.html
Not implemented: sequence notation:
["winter", "spring", "summer", "autumn"]
Not implemented:
<#break>
See
http://freemarker.org/docs/ref_directive_assign.html
Currently only implemented:
<#assign name>
capture this
</#assign>
_handleQueryExpressions($key, $query, \%keyValues) -> $text
Only implemented:
replace (string): replace text string by another text string
syntax: text?replace("from", "to")
join (array): join elements from a list
syntax: list?join(",")
_getValue( $key, \%keyValues ) => $value
Gets the value from the $keyValues hash.
Dies if the key was not found - see
http://fmpp.sourceforge.net/freemarker/app_faq.html#faq_picky_about_missing_vars
("Why is
FreeMarker so picky about null-s and missing variables, and what to do with it?")
cleanupTemplateResidues( $templateText )
Removes remaining template rubble.