diet.dom

Types to represent the DOM tree.

The DOM tree is used as an intermediate representation between the parser and the generator. Filters and other kinds of transformations can be executed on the DOM tree. The generator itself will apply filters and other traits using diet.traits.applyTraits.

Members

Enums

NodeAttribs
enum NodeAttribs

Flags that control parser or generator behavior.

Functions

clone
Vector!Node clone(Node[] nodes)
Undocumented in source. Be warned that the author may not have intended to support it.
expectExpression
string expectExpression(const(Attribute) att)
Undocumented in source. Be warned that the author may not have intended to support it.
expectText
string expectText(const(Attribute) att)
Undocumented in source. Be warned that the author may not have intended to support it.
expectText
string expectText(const(Node) n)
Undocumented in source. Be warned that the author may not have intended to support it.
isExpression
bool isExpression(const(Attribute) att)
Undocumented in source. Be warned that the author may not have intended to support it.
isText
bool isText(const(Attribute) att)
Undocumented in source. Be warned that the author may not have intended to support it.
toNodeContent
NodeContent[] toNodeContent(AttributeContent[] contents, Location loc)

Converts an array of attribute contents to node contents.

Structs

Attribute
struct Attribute

A single node attribute.

AttributeContent
struct AttributeContent

A single piece of an attribute value.

Document
struct Document

Encapsulates a full Diet template document.

Location
struct Location

Represents the location of an entity within the source file.

Node
struct Node

Represents a single node in the DOM tree.

NodeContent
struct NodeContent

A single piece of node content.

Meta