vibe.d beta banner
get vibe.d
0.7.31

parseDiet - multiple declarations

Function parseDiet

Document parseDiet(alias TR) (
  InputFile[] files
)
if (is(typeof(TR(string.init)) == string));

Function parseDiet

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

Document parseDiet(alias TR) (
  string text,
  string filename = "string"
)
if (is(typeof(TR(string.init)) == string));

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

Parameters

NameDescription
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).
text For the single-file overload, specifies the contents of the Diet template.
filename For the single-file overload, specifies the file name that is displayed in error messages and stored in the DOM Locations.
files A full set of Diet template files. All files referenced in includes or extension directives must be present.

Returns

The list of parsed root nodes is returned.

Authors
Copyright
License