pub enum TwigElementType {
Show 55 variants
Root,
Document,
Template,
Block,
Variable,
Filter,
Function,
Tag,
Comment,
Text,
Expression,
IfStatement,
ForStatement,
MacroDefinition,
Literal,
String,
Number,
Boolean,
Null,
Array,
Object,
Identifier,
Operator,
ErrorNode,
LeftBrace,
RightBrace,
LeftBracket,
RightBracket,
DoubleLeftBrace,
DoubleRightBrace,
LeftBracePercent,
PercentRightBrace,
LeftParen,
RightParen,
Pipe,
Comma,
Dot,
Colon,
Semicolon,
Eq,
Plus,
Minus,
Star,
Slash,
Percent,
Bang,
Question,
Lt,
Gt,
Amp,
Caret,
Tilde,
Whitespace,
Eof,
Error,
}Expand description
Element types for the Twig parser. Element types for Twig syntax nodes.
Variants§
Root
The root node of the parse tree.
Document
A document node.
Template
A template node.
Block
A block node ({% block %}).
Variable
A variable node ({{ var }}).
Filter
A filter node (| filter).
Function
A function node (func()).
Tag
A tag node ({% tag %}).
Comment
A comment node ({# comment #}).
Text
Plain text content.
Expression
An expression node.
IfStatement
An if statement node ({% if %}).
ForStatement
A for statement node ({% for %}).
MacroDefinition
A macro definition node ({% macro %}).
Literal
A generic literal.
String
A string literal.
Number
A numeric literal.
Boolean
A boolean literal.
Null
A null literal.
Array
An array literal.
Object
An object literal.
Identifier
An identifier.
Operator
An operator.
ErrorNode
An error node in the parse tree.
LeftBrace
An opening brace ({).
RightBrace
A closing brace (}).
LeftBracket
An opening bracket ([).
RightBracket
A closing bracket (]).
DoubleLeftBrace
Double opening braces ({{).
DoubleRightBrace
Double closing braces (}}).
LeftBracePercent
Opening brace and percent ({%).
PercentRightBrace
Percent and closing brace (%}).
LeftParen
An opening parenthesis (().
RightParen
A closing parenthesis ()).
Pipe
A pipe character (|).
Comma
A comma (,).
Dot
A dot character (.).
Colon
A colon character (:).
Semicolon
A semicolon character (;).
Eq
An equal sign (=).
Plus
A plus sign (+).
Minus
A minus sign (-).
Star
A star sign (*).
Slash
A slash sign (/).
Percent
A percent sign (%).
Bang
An exclamation mark (!).
Question
A question mark (?).
Lt
A less-than sign (<).
Gt
A greater-than sign (>).
Amp
An ampersand character (&).
Caret
A caret character (^).
Tilde
A tilde character (~).
Whitespace
Whitespace characters.
Eof
End of stream.
Error
An error element.
Trait Implementations§
Source§impl Clone for TwigElementType
impl Clone for TwigElementType
Source§fn clone(&self) -> TwigElementType
fn clone(&self) -> TwigElementType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more