@@ -34,11 +34,12 @@ Enumeration of all possible node types in the AST.
3434
3535``` rust
3636pub enum Node {
37- Text {
37+ Block (Block ),
38+ Comment {
3839 content : String ,
3940 span : Span ,
4041 },
41- Comment {
42+ Text {
4243 content : String ,
4344 span : Span ,
4445 },
@@ -47,52 +48,6 @@ pub enum Node {
4748 filters : Vec <DjangoFilter >,
4849 span : Span ,
4950 },
50- Block (Block ),
51- }
52- ```
53-
54- #### ` Node::Text `
55-
56- Represents raw text and HTML content outside of Django template tags.
57-
58- ``` rust
59- Node :: Text {
60- content : String , // The raw text content
61- span : Span , // The position of the text in the template
62- }
63- ```
64-
65- #### ` Node::Comment `
66-
67- Represents Django template comments (` {# ... #} ` ).
68-
69- ``` rust
70- Node :: Comment {
71- content : String , // The comment content
72- span : Span , // The position of the comment in the template
73- }
74- ```
75-
76- #### ` Node::Variable `
77-
78- Represents variable interpolation (` {{ variable|filter }} ` ).
79-
80- ``` rust
81- Node :: Variable {
82- bits : Vec <String >, // Components of the variable path
83- filters : Vec <DjangoFilter >, // Filters applied to the variable
84- span : Span , // The position of the variable in the template
85- }
86- ```
87-
88- ##### ` DjangoFilter `
89-
90- Represents a filter applied to a variable.
91-
92- ``` rust
93- pub struct DjangoFilter {
94- pub name : String , // Name of the filter
95- pub args : Vec <String >, // Arguments passed to the filter
9651}
9752```
9853
@@ -242,6 +197,51 @@ Examples:
242197- ` {% load %} `
243198- ` {% now "Y-m-d" %} `
244199
200+ #### ` Node::Comment `
201+
202+ Represents Django template comments (` {# ... #} ` ).
203+
204+ ``` rust
205+ Node :: Comment {
206+ content : String , // The comment content
207+ span : Span , // The position of the comment in the template
208+ }
209+ ```
210+
211+ #### ` Node::Text `
212+
213+ Represents raw text and HTML content outside of Django template tags.
214+
215+ ``` rust
216+ Node :: Text {
217+ content : String , // The raw text content
218+ span : Span , // The position of the text in the template
219+ }
220+ ```
221+
222+ #### ` Node::Variable `
223+
224+ Represents variable interpolation (` {{ variable|filter }} ` ).
225+
226+ ``` rust
227+ Node :: Variable {
228+ bits : Vec <String >, // Components of the variable path
229+ filters : Vec <DjangoFilter >, // Filters applied to the variable
230+ span : Span , // The position of the variable in the template
231+ }
232+ ```
233+
234+ ##### ` DjangoFilter `
235+
236+ Represents a filter applied to a variable.
237+
238+ ``` rust
239+ pub struct DjangoFilter {
240+ pub name : String , // Name of the filter
241+ pub args : Vec <String >, // Arguments passed to the filter
242+ }
243+ ```
244+
245245## TagSpecs
246246
247247### Schema
0 commit comments