Module ludtwig_parser::ast[][src]

The AST (abstract syntax tree) represents the template syntax in a structured format. It mainly consists of an enum SyntaxNode which has different variants for each syntax.

Structs

HtmlAttribute

Represents any html tag attribute like class="hello".

HtmlComment
OutputExpression
Plain

Represents one line of plain text in the html document without line break characters or indentation.

Tag
TwigApply
TwigBlock
TwigComment
TwigFor
TwigIf

Represents a full set of if / elseif / else expressions.

TwigIfArm

Represents one Arm of a possible multi arm if

TwigSetCapture

Enums

SyntaxNode

The base enum for each syntax element in a document. Each variant represents some sort of structured representation of the document syntax. This is the foundation for the AST (abstract syntax tree) that is produced by the parser.

TagAttribute
TwigStatement
TwigStructure

Traits

HasChildren

Every AST data structure that implements this trait has a list of children (of type SyntaxNode).