vibe.d beta banner
get vibe.d
0.7.30

Module diet.parser

Generic Diet format parser.

Performs generic parsing of a Diet template file. The resulting AST is agnostic to the output format context in which it is used. Format specific constructs, such as inline code or special tags, are parsed as-is without any preprocessing.

The supported features of the are:

  • string interpolations
  • assignment expressions
  • blocks/extensions
  • includes
  • text paragraphs
  • translation annotations
  • class and ID attribute shortcuts

Functions

NameDescription
identity(str)Dummy translation function that returns the input unmodified.
parseDiet(files)
parseDiet(text, filename)Parses a Diet template document and outputs the resulting DOM tree.
parseDietRaw(file)Parses a single Diet template file, without resolving includes and extensions.
Authors
Copyright
License