scanTemplate function
Finds the variables and sections in text, the template file at
path.
It follows mustache: {{{name}}}, {{name}} and {{& name}} are
variables, {{#name}} and {{^name}} open sections that {{/name}}
closes, {{! starts a comment and {{> includes a partial. Four opening
braces are a { followed by a variable. A delimiter change, {{=… …=}},
ends the scan, since the pipeline does not support it.
Implementation
TemplateScan scanTemplate(String path, String text) =>
_TemplateScanner(path, text).scan();