parseDiet

Parses a Diet template document and outputs the resulting DOM tree.

The overload that takes a list of files will automatically resolve includes and extensions.

  1. Document parseDiet(string text, string filename)
  2. Document parseDiet(F files)
    nothrow
    parseDiet
    (
    F
    )
    ()
    if (
    is(typeof(TR(string.init)) == string) ||
    is(typeof(TR(string.init, string.init)) == string)
    )

Parameters

TR

An optional translation function that takes and returns a string. This function will be invoked whenever node text contents need to be translated at compile tile (for the & node suffix).

files F

A full set of Diet template files. All files referenced in includes or extension directives must be present.

Return Value

Type: Document

The list of parsed root nodes is returned.

Meta