Module 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 applyTraits
.
Functions
Name | Description |
---|---|
clone(nodes)
|
|
expectExpression(att)
|
|
expectText(att)
|
|
expectText(n)
|
|
isExpression(att)
|
|
isText(att)
|
|
toNodeContent(contents, loc)
|
Converts an array of attribute contents to node contents. |
Classes
Name | Description |
---|---|
Document
|
Encapsulates a full Diet template document. |
Node
|
Represents a single node in the DOM tree. |
Structs
Name | Description |
---|---|
Attribute
|
A single node attribute. |
AttributeContent
|
A single piece of an attribute value. |
Location
|
Represents the location of an entity within the source file. |
NodeContent
|
A single piece of node content. |
Enums
Name | Description |
---|---|
NodeAttribs
|
Flags that control parser or generator behavior. |