Skip to main content

treesitter_types_html/
generated.rs

1#[derive(Debug, Clone)]
2pub struct Attribute<'tree> {
3    pub span: ::treesitter_types::Span,
4    pub children: ::std::vec::Vec<AttributeChildren<'tree>>,
5}
6impl<'tree> ::treesitter_types::FromNode<'tree> for Attribute<'tree> {
7    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
8    fn from_node(
9        node: ::tree_sitter::Node<'tree>,
10        src: &'tree [u8],
11    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
12        debug_assert_eq!(node.kind(), "attribute");
13        Ok(Self {
14            span: ::treesitter_types::Span::from(node),
15            children: {
16                #[allow(clippy::suspicious_else_formatting)]
17                let non_field_children = {
18                    let mut cursor = node.walk();
19                    let mut result = ::std::vec::Vec::new();
20                    if cursor.goto_first_child() {
21                        loop {
22                            if cursor.field_name().is_none()
23                                && cursor.node().is_named()
24                                && !cursor.node().is_extra()
25                            {
26                                result.push(cursor.node());
27                            }
28                            if !cursor.goto_next_sibling() {
29                                break;
30                            }
31                        }
32                    }
33                    result
34                };
35                let mut items = ::std::vec::Vec::new();
36                for child in non_field_children {
37                    items.push(
38                        <AttributeChildren as ::treesitter_types::FromNode>::from_node(child, src)?,
39                    );
40                }
41                items
42            },
43        })
44    }
45}
46impl ::treesitter_types::Spanned for Attribute<'_> {
47    fn span(&self) -> ::treesitter_types::Span {
48        self.span
49    }
50}
51#[derive(Debug, Clone)]
52pub struct Doctype<'tree> {
53    pub span: ::treesitter_types::Span,
54    text: &'tree str,
55}
56impl<'tree> ::treesitter_types::FromNode<'tree> for Doctype<'tree> {
57    fn from_node(
58        node: ::tree_sitter::Node<'tree>,
59        src: &'tree [u8],
60    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
61        debug_assert_eq!(node.kind(), "doctype");
62        Ok(Self {
63            span: ::treesitter_types::Span::from(node),
64            text: node.utf8_text(src)?,
65        })
66    }
67}
68impl<'tree> ::treesitter_types::LeafNode<'tree> for Doctype<'tree> {
69    fn text(&self) -> &'tree str {
70        self.text
71    }
72}
73impl ::treesitter_types::Spanned for Doctype<'_> {
74    fn span(&self) -> ::treesitter_types::Span {
75        self.span
76    }
77}
78#[derive(Debug, Clone)]
79pub struct Document<'tree> {
80    pub span: ::treesitter_types::Span,
81    pub children: ::std::vec::Vec<DocumentChildren<'tree>>,
82}
83impl<'tree> ::treesitter_types::FromNode<'tree> for Document<'tree> {
84    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
85    fn from_node(
86        node: ::tree_sitter::Node<'tree>,
87        src: &'tree [u8],
88    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
89        debug_assert_eq!(node.kind(), "document");
90        Ok(Self {
91            span: ::treesitter_types::Span::from(node),
92            children: {
93                #[allow(clippy::suspicious_else_formatting)]
94                let non_field_children = {
95                    let mut cursor = node.walk();
96                    let mut result = ::std::vec::Vec::new();
97                    if cursor.goto_first_child() {
98                        loop {
99                            if cursor.field_name().is_none()
100                                && cursor.node().is_named()
101                                && !cursor.node().is_extra()
102                            {
103                                result.push(cursor.node());
104                            }
105                            if !cursor.goto_next_sibling() {
106                                break;
107                            }
108                        }
109                    }
110                    result
111                };
112                let mut items = ::std::vec::Vec::new();
113                for child in non_field_children {
114                    items.push(
115                        <DocumentChildren as ::treesitter_types::FromNode>::from_node(child, src)?,
116                    );
117                }
118                items
119            },
120        })
121    }
122}
123impl ::treesitter_types::Spanned for Document<'_> {
124    fn span(&self) -> ::treesitter_types::Span {
125        self.span
126    }
127}
128#[derive(Debug, Clone)]
129pub struct Element<'tree> {
130    pub span: ::treesitter_types::Span,
131    pub children: ::std::vec::Vec<ElementChildren<'tree>>,
132}
133impl<'tree> ::treesitter_types::FromNode<'tree> for Element<'tree> {
134    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
135    fn from_node(
136        node: ::tree_sitter::Node<'tree>,
137        src: &'tree [u8],
138    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
139        debug_assert_eq!(node.kind(), "element");
140        Ok(Self {
141            span: ::treesitter_types::Span::from(node),
142            children: {
143                #[allow(clippy::suspicious_else_formatting)]
144                let non_field_children = {
145                    let mut cursor = node.walk();
146                    let mut result = ::std::vec::Vec::new();
147                    if cursor.goto_first_child() {
148                        loop {
149                            if cursor.field_name().is_none()
150                                && cursor.node().is_named()
151                                && !cursor.node().is_extra()
152                            {
153                                result.push(cursor.node());
154                            }
155                            if !cursor.goto_next_sibling() {
156                                break;
157                            }
158                        }
159                    }
160                    result
161                };
162                let mut items = ::std::vec::Vec::new();
163                for child in non_field_children {
164                    items.push(
165                        <ElementChildren as ::treesitter_types::FromNode>::from_node(child, src)?,
166                    );
167                }
168                items
169            },
170        })
171    }
172}
173impl ::treesitter_types::Spanned for Element<'_> {
174    fn span(&self) -> ::treesitter_types::Span {
175        self.span
176    }
177}
178#[derive(Debug, Clone)]
179pub struct EndTag<'tree> {
180    pub span: ::treesitter_types::Span,
181    pub children: TagName<'tree>,
182}
183impl<'tree> ::treesitter_types::FromNode<'tree> for EndTag<'tree> {
184    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
185    fn from_node(
186        node: ::tree_sitter::Node<'tree>,
187        src: &'tree [u8],
188    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
189        debug_assert_eq!(node.kind(), "end_tag");
190        Ok(Self {
191            span: ::treesitter_types::Span::from(node),
192            children: {
193                #[allow(clippy::suspicious_else_formatting)]
194                let non_field_children = {
195                    let mut cursor = node.walk();
196                    let mut result = ::std::vec::Vec::new();
197                    if cursor.goto_first_child() {
198                        loop {
199                            if cursor.field_name().is_none()
200                                && cursor.node().is_named()
201                                && !cursor.node().is_extra()
202                            {
203                                result.push(cursor.node());
204                            }
205                            if !cursor.goto_next_sibling() {
206                                break;
207                            }
208                        }
209                    }
210                    result
211                };
212                let child = if let Some(&c) = non_field_children.first() {
213                    c
214                } else {
215                    let mut fallback_cursor = node.walk();
216                    let mut fallback_child = None;
217                    if fallback_cursor.goto_first_child() {
218                        loop {
219                            if fallback_cursor.field_name().is_none()
220                                && !fallback_cursor.node().is_extra()
221                            {
222                                let candidate = fallback_cursor.node();
223                                #[allow(clippy::needless_question_mark)]
224                                if (|| -> ::core::result::Result<
225                                    _,
226                                    ::treesitter_types::ParseError,
227                                > {
228                                    let child = candidate;
229                                    Ok(
230                                        <TagName as ::treesitter_types::FromNode>::from_node(
231                                            child,
232                                            src,
233                                        )?,
234                                    )
235                                })()
236                                    .is_ok()
237                                {
238                                    fallback_child = Some(candidate);
239                                    break;
240                                }
241                            }
242                            if !fallback_cursor.goto_next_sibling() {
243                                break;
244                            }
245                        }
246                    }
247                    if fallback_child.is_none() {
248                        let mut cursor2 = node.walk();
249                        if cursor2.goto_first_child() {
250                            loop {
251                                if cursor2.node().is_named() && !cursor2.node().is_extra() {
252                                    let candidate = cursor2.node();
253                                    #[allow(clippy::needless_question_mark)]
254                                    if (|| -> ::core::result::Result<
255                                        _,
256                                        ::treesitter_types::ParseError,
257                                    > {
258                                        let child = candidate;
259                                        Ok(
260                                            <TagName as ::treesitter_types::FromNode>::from_node(
261                                                child,
262                                                src,
263                                            )?,
264                                        )
265                                    })()
266                                        .is_ok()
267                                    {
268                                        fallback_child = Some(candidate);
269                                        break;
270                                    }
271                                }
272                                if !cursor2.goto_next_sibling() {
273                                    break;
274                                }
275                            }
276                        }
277                    }
278                    fallback_child.ok_or_else(|| {
279                        ::treesitter_types::ParseError::missing_field("children", node)
280                    })?
281                };
282                <TagName as ::treesitter_types::FromNode>::from_node(child, src)?
283            },
284        })
285    }
286}
287impl ::treesitter_types::Spanned for EndTag<'_> {
288    fn span(&self) -> ::treesitter_types::Span {
289        self.span
290    }
291}
292#[derive(Debug, Clone)]
293pub struct ErroneousEndTag<'tree> {
294    pub span: ::treesitter_types::Span,
295    pub children: ErroneousEndTagName<'tree>,
296}
297impl<'tree> ::treesitter_types::FromNode<'tree> for ErroneousEndTag<'tree> {
298    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
299    fn from_node(
300        node: ::tree_sitter::Node<'tree>,
301        src: &'tree [u8],
302    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
303        debug_assert_eq!(node.kind(), "erroneous_end_tag");
304        Ok(Self {
305            span: ::treesitter_types::Span::from(node),
306            children: {
307                #[allow(clippy::suspicious_else_formatting)]
308                let non_field_children = {
309                    let mut cursor = node.walk();
310                    let mut result = ::std::vec::Vec::new();
311                    if cursor.goto_first_child() {
312                        loop {
313                            if cursor.field_name().is_none()
314                                && cursor.node().is_named()
315                                && !cursor.node().is_extra()
316                            {
317                                result.push(cursor.node());
318                            }
319                            if !cursor.goto_next_sibling() {
320                                break;
321                            }
322                        }
323                    }
324                    result
325                };
326                let child = if let Some(&c) = non_field_children.first() {
327                    c
328                } else {
329                    let mut fallback_cursor = node.walk();
330                    let mut fallback_child = None;
331                    if fallback_cursor.goto_first_child() {
332                        loop {
333                            if fallback_cursor.field_name().is_none()
334                                && !fallback_cursor.node().is_extra()
335                            {
336                                let candidate = fallback_cursor.node();
337                                #[allow(clippy::needless_question_mark)]
338                                if (|| -> ::core::result::Result<
339                                    _,
340                                    ::treesitter_types::ParseError,
341                                > {
342                                    let child = candidate;
343                                    Ok(
344                                        <ErroneousEndTagName as ::treesitter_types::FromNode>::from_node(
345                                            child,
346                                            src,
347                                        )?,
348                                    )
349                                })()
350                                    .is_ok()
351                                {
352                                    fallback_child = Some(candidate);
353                                    break;
354                                }
355                            }
356                            if !fallback_cursor.goto_next_sibling() {
357                                break;
358                            }
359                        }
360                    }
361                    if fallback_child.is_none() {
362                        let mut cursor2 = node.walk();
363                        if cursor2.goto_first_child() {
364                            loop {
365                                if cursor2.node().is_named() && !cursor2.node().is_extra() {
366                                    let candidate = cursor2.node();
367                                    #[allow(clippy::needless_question_mark)]
368                                    if (|| -> ::core::result::Result<
369                                        _,
370                                        ::treesitter_types::ParseError,
371                                    > {
372                                        let child = candidate;
373                                        Ok(
374                                            <ErroneousEndTagName as ::treesitter_types::FromNode>::from_node(
375                                                child,
376                                                src,
377                                            )?,
378                                        )
379                                    })()
380                                        .is_ok()
381                                    {
382                                        fallback_child = Some(candidate);
383                                        break;
384                                    }
385                                }
386                                if !cursor2.goto_next_sibling() {
387                                    break;
388                                }
389                            }
390                        }
391                    }
392                    fallback_child.ok_or_else(|| {
393                        ::treesitter_types::ParseError::missing_field("children", node)
394                    })?
395                };
396                <ErroneousEndTagName as ::treesitter_types::FromNode>::from_node(child, src)?
397            },
398        })
399    }
400}
401impl ::treesitter_types::Spanned for ErroneousEndTag<'_> {
402    fn span(&self) -> ::treesitter_types::Span {
403        self.span
404    }
405}
406#[derive(Debug, Clone)]
407pub struct QuotedAttributeValue<'tree> {
408    pub span: ::treesitter_types::Span,
409    pub children: ::core::option::Option<AttributeValue<'tree>>,
410}
411impl<'tree> ::treesitter_types::FromNode<'tree> for QuotedAttributeValue<'tree> {
412    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
413    fn from_node(
414        node: ::tree_sitter::Node<'tree>,
415        src: &'tree [u8],
416    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
417        debug_assert_eq!(node.kind(), "quoted_attribute_value");
418        Ok(Self {
419            span: ::treesitter_types::Span::from(node),
420            children: {
421                #[allow(clippy::suspicious_else_formatting)]
422                let non_field_children = {
423                    let mut cursor = node.walk();
424                    let mut result = ::std::vec::Vec::new();
425                    if cursor.goto_first_child() {
426                        loop {
427                            if cursor.field_name().is_none()
428                                && cursor.node().is_named()
429                                && !cursor.node().is_extra()
430                            {
431                                result.push(cursor.node());
432                            }
433                            if !cursor.goto_next_sibling() {
434                                break;
435                            }
436                        }
437                    }
438                    result
439                };
440                match non_field_children.first() {
441                    Some(&child) => Some(
442                        <AttributeValue as ::treesitter_types::FromNode>::from_node(child, src)?,
443                    ),
444                    None => None,
445                }
446            },
447        })
448    }
449}
450impl ::treesitter_types::Spanned for QuotedAttributeValue<'_> {
451    fn span(&self) -> ::treesitter_types::Span {
452        self.span
453    }
454}
455#[derive(Debug, Clone)]
456pub struct ScriptElement<'tree> {
457    pub span: ::treesitter_types::Span,
458    pub children: ::std::vec::Vec<ScriptElementChildren<'tree>>,
459}
460impl<'tree> ::treesitter_types::FromNode<'tree> for ScriptElement<'tree> {
461    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
462    fn from_node(
463        node: ::tree_sitter::Node<'tree>,
464        src: &'tree [u8],
465    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
466        debug_assert_eq!(node.kind(), "script_element");
467        Ok(Self {
468            span: ::treesitter_types::Span::from(node),
469            children: {
470                #[allow(clippy::suspicious_else_formatting)]
471                let non_field_children = {
472                    let mut cursor = node.walk();
473                    let mut result = ::std::vec::Vec::new();
474                    if cursor.goto_first_child() {
475                        loop {
476                            if cursor.field_name().is_none()
477                                && cursor.node().is_named()
478                                && !cursor.node().is_extra()
479                            {
480                                result.push(cursor.node());
481                            }
482                            if !cursor.goto_next_sibling() {
483                                break;
484                            }
485                        }
486                    }
487                    result
488                };
489                let mut items = ::std::vec::Vec::new();
490                for child in non_field_children {
491                    items.push(
492                        <ScriptElementChildren as ::treesitter_types::FromNode>::from_node(
493                            child, src,
494                        )?,
495                    );
496                }
497                items
498            },
499        })
500    }
501}
502impl ::treesitter_types::Spanned for ScriptElement<'_> {
503    fn span(&self) -> ::treesitter_types::Span {
504        self.span
505    }
506}
507#[derive(Debug, Clone)]
508pub struct SelfClosingTag<'tree> {
509    pub span: ::treesitter_types::Span,
510    pub children: ::std::vec::Vec<SelfClosingTagChildren<'tree>>,
511}
512impl<'tree> ::treesitter_types::FromNode<'tree> for SelfClosingTag<'tree> {
513    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
514    fn from_node(
515        node: ::tree_sitter::Node<'tree>,
516        src: &'tree [u8],
517    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
518        debug_assert_eq!(node.kind(), "self_closing_tag");
519        Ok(Self {
520            span: ::treesitter_types::Span::from(node),
521            children: {
522                #[allow(clippy::suspicious_else_formatting)]
523                let non_field_children = {
524                    let mut cursor = node.walk();
525                    let mut result = ::std::vec::Vec::new();
526                    if cursor.goto_first_child() {
527                        loop {
528                            if cursor.field_name().is_none()
529                                && cursor.node().is_named()
530                                && !cursor.node().is_extra()
531                            {
532                                result.push(cursor.node());
533                            }
534                            if !cursor.goto_next_sibling() {
535                                break;
536                            }
537                        }
538                    }
539                    result
540                };
541                let mut items = ::std::vec::Vec::new();
542                for child in non_field_children {
543                    items.push(
544                        <SelfClosingTagChildren as ::treesitter_types::FromNode>::from_node(
545                            child, src,
546                        )?,
547                    );
548                }
549                items
550            },
551        })
552    }
553}
554impl ::treesitter_types::Spanned for SelfClosingTag<'_> {
555    fn span(&self) -> ::treesitter_types::Span {
556        self.span
557    }
558}
559#[derive(Debug, Clone)]
560pub struct StartTag<'tree> {
561    pub span: ::treesitter_types::Span,
562    pub children: ::std::vec::Vec<StartTagChildren<'tree>>,
563}
564impl<'tree> ::treesitter_types::FromNode<'tree> for StartTag<'tree> {
565    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
566    fn from_node(
567        node: ::tree_sitter::Node<'tree>,
568        src: &'tree [u8],
569    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
570        debug_assert_eq!(node.kind(), "start_tag");
571        Ok(Self {
572            span: ::treesitter_types::Span::from(node),
573            children: {
574                #[allow(clippy::suspicious_else_formatting)]
575                let non_field_children = {
576                    let mut cursor = node.walk();
577                    let mut result = ::std::vec::Vec::new();
578                    if cursor.goto_first_child() {
579                        loop {
580                            if cursor.field_name().is_none()
581                                && cursor.node().is_named()
582                                && !cursor.node().is_extra()
583                            {
584                                result.push(cursor.node());
585                            }
586                            if !cursor.goto_next_sibling() {
587                                break;
588                            }
589                        }
590                    }
591                    result
592                };
593                let mut items = ::std::vec::Vec::new();
594                for child in non_field_children {
595                    items.push(
596                        <StartTagChildren as ::treesitter_types::FromNode>::from_node(child, src)?,
597                    );
598                }
599                items
600            },
601        })
602    }
603}
604impl ::treesitter_types::Spanned for StartTag<'_> {
605    fn span(&self) -> ::treesitter_types::Span {
606        self.span
607    }
608}
609#[derive(Debug, Clone)]
610pub struct StyleElement<'tree> {
611    pub span: ::treesitter_types::Span,
612    pub children: ::std::vec::Vec<StyleElementChildren<'tree>>,
613}
614impl<'tree> ::treesitter_types::FromNode<'tree> for StyleElement<'tree> {
615    #[allow(clippy::match_single_binding, clippy::suspicious_else_formatting)]
616    fn from_node(
617        node: ::tree_sitter::Node<'tree>,
618        src: &'tree [u8],
619    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
620        debug_assert_eq!(node.kind(), "style_element");
621        Ok(Self {
622            span: ::treesitter_types::Span::from(node),
623            children: {
624                #[allow(clippy::suspicious_else_formatting)]
625                let non_field_children = {
626                    let mut cursor = node.walk();
627                    let mut result = ::std::vec::Vec::new();
628                    if cursor.goto_first_child() {
629                        loop {
630                            if cursor.field_name().is_none()
631                                && cursor.node().is_named()
632                                && !cursor.node().is_extra()
633                            {
634                                result.push(cursor.node());
635                            }
636                            if !cursor.goto_next_sibling() {
637                                break;
638                            }
639                        }
640                    }
641                    result
642                };
643                let mut items = ::std::vec::Vec::new();
644                for child in non_field_children {
645                    items.push(
646                        <StyleElementChildren as ::treesitter_types::FromNode>::from_node(
647                            child, src,
648                        )?,
649                    );
650                }
651                items
652            },
653        })
654    }
655}
656impl ::treesitter_types::Spanned for StyleElement<'_> {
657    fn span(&self) -> ::treesitter_types::Span {
658        self.span
659    }
660}
661#[derive(Debug, Clone)]
662pub struct AttributeName<'tree> {
663    pub span: ::treesitter_types::Span,
664    text: &'tree str,
665}
666impl<'tree> ::treesitter_types::FromNode<'tree> for AttributeName<'tree> {
667    fn from_node(
668        node: ::tree_sitter::Node<'tree>,
669        src: &'tree [u8],
670    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
671        debug_assert_eq!(node.kind(), "attribute_name");
672        Ok(Self {
673            span: ::treesitter_types::Span::from(node),
674            text: node.utf8_text(src)?,
675        })
676    }
677}
678impl<'tree> ::treesitter_types::LeafNode<'tree> for AttributeName<'tree> {
679    fn text(&self) -> &'tree str {
680        self.text
681    }
682}
683impl ::treesitter_types::Spanned for AttributeName<'_> {
684    fn span(&self) -> ::treesitter_types::Span {
685        self.span
686    }
687}
688#[derive(Debug, Clone)]
689pub struct AttributeValue<'tree> {
690    pub span: ::treesitter_types::Span,
691    text: &'tree str,
692}
693impl<'tree> ::treesitter_types::FromNode<'tree> for AttributeValue<'tree> {
694    fn from_node(
695        node: ::tree_sitter::Node<'tree>,
696        src: &'tree [u8],
697    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
698        debug_assert_eq!(node.kind(), "attribute_value");
699        Ok(Self {
700            span: ::treesitter_types::Span::from(node),
701            text: node.utf8_text(src)?,
702        })
703    }
704}
705impl<'tree> ::treesitter_types::LeafNode<'tree> for AttributeValue<'tree> {
706    fn text(&self) -> &'tree str {
707        self.text
708    }
709}
710impl ::treesitter_types::Spanned for AttributeValue<'_> {
711    fn span(&self) -> ::treesitter_types::Span {
712        self.span
713    }
714}
715#[derive(Debug, Clone)]
716pub struct Comment<'tree> {
717    pub span: ::treesitter_types::Span,
718    text: &'tree str,
719}
720impl<'tree> ::treesitter_types::FromNode<'tree> for Comment<'tree> {
721    fn from_node(
722        node: ::tree_sitter::Node<'tree>,
723        src: &'tree [u8],
724    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
725        debug_assert_eq!(node.kind(), "comment");
726        Ok(Self {
727            span: ::treesitter_types::Span::from(node),
728            text: node.utf8_text(src)?,
729        })
730    }
731}
732impl<'tree> ::treesitter_types::LeafNode<'tree> for Comment<'tree> {
733    fn text(&self) -> &'tree str {
734        self.text
735    }
736}
737impl ::treesitter_types::Spanned for Comment<'_> {
738    fn span(&self) -> ::treesitter_types::Span {
739        self.span
740    }
741}
742#[derive(Debug, Clone)]
743pub struct Entity<'tree> {
744    pub span: ::treesitter_types::Span,
745    text: &'tree str,
746}
747impl<'tree> ::treesitter_types::FromNode<'tree> for Entity<'tree> {
748    fn from_node(
749        node: ::tree_sitter::Node<'tree>,
750        src: &'tree [u8],
751    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
752        debug_assert_eq!(node.kind(), "entity");
753        Ok(Self {
754            span: ::treesitter_types::Span::from(node),
755            text: node.utf8_text(src)?,
756        })
757    }
758}
759impl<'tree> ::treesitter_types::LeafNode<'tree> for Entity<'tree> {
760    fn text(&self) -> &'tree str {
761        self.text
762    }
763}
764impl ::treesitter_types::Spanned for Entity<'_> {
765    fn span(&self) -> ::treesitter_types::Span {
766        self.span
767    }
768}
769#[derive(Debug, Clone)]
770pub struct ErroneousEndTagName<'tree> {
771    pub span: ::treesitter_types::Span,
772    text: &'tree str,
773}
774impl<'tree> ::treesitter_types::FromNode<'tree> for ErroneousEndTagName<'tree> {
775    fn from_node(
776        node: ::tree_sitter::Node<'tree>,
777        src: &'tree [u8],
778    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
779        debug_assert_eq!(node.kind(), "erroneous_end_tag_name");
780        Ok(Self {
781            span: ::treesitter_types::Span::from(node),
782            text: node.utf8_text(src)?,
783        })
784    }
785}
786impl<'tree> ::treesitter_types::LeafNode<'tree> for ErroneousEndTagName<'tree> {
787    fn text(&self) -> &'tree str {
788        self.text
789    }
790}
791impl ::treesitter_types::Spanned for ErroneousEndTagName<'_> {
792    fn span(&self) -> ::treesitter_types::Span {
793        self.span
794    }
795}
796#[derive(Debug, Clone)]
797pub struct RawText<'tree> {
798    pub span: ::treesitter_types::Span,
799    text: &'tree str,
800}
801impl<'tree> ::treesitter_types::FromNode<'tree> for RawText<'tree> {
802    fn from_node(
803        node: ::tree_sitter::Node<'tree>,
804        src: &'tree [u8],
805    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
806        debug_assert_eq!(node.kind(), "raw_text");
807        Ok(Self {
808            span: ::treesitter_types::Span::from(node),
809            text: node.utf8_text(src)?,
810        })
811    }
812}
813impl<'tree> ::treesitter_types::LeafNode<'tree> for RawText<'tree> {
814    fn text(&self) -> &'tree str {
815        self.text
816    }
817}
818impl ::treesitter_types::Spanned for RawText<'_> {
819    fn span(&self) -> ::treesitter_types::Span {
820        self.span
821    }
822}
823#[derive(Debug, Clone)]
824pub struct TagName<'tree> {
825    pub span: ::treesitter_types::Span,
826    text: &'tree str,
827}
828impl<'tree> ::treesitter_types::FromNode<'tree> for TagName<'tree> {
829    fn from_node(
830        node: ::tree_sitter::Node<'tree>,
831        src: &'tree [u8],
832    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
833        debug_assert_eq!(node.kind(), "tag_name");
834        Ok(Self {
835            span: ::treesitter_types::Span::from(node),
836            text: node.utf8_text(src)?,
837        })
838    }
839}
840impl<'tree> ::treesitter_types::LeafNode<'tree> for TagName<'tree> {
841    fn text(&self) -> &'tree str {
842        self.text
843    }
844}
845impl ::treesitter_types::Spanned for TagName<'_> {
846    fn span(&self) -> ::treesitter_types::Span {
847        self.span
848    }
849}
850#[derive(Debug, Clone)]
851pub struct Text<'tree> {
852    pub span: ::treesitter_types::Span,
853    text: &'tree str,
854}
855impl<'tree> ::treesitter_types::FromNode<'tree> for Text<'tree> {
856    fn from_node(
857        node: ::tree_sitter::Node<'tree>,
858        src: &'tree [u8],
859    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
860        debug_assert_eq!(node.kind(), "text");
861        Ok(Self {
862            span: ::treesitter_types::Span::from(node),
863            text: node.utf8_text(src)?,
864        })
865    }
866}
867impl<'tree> ::treesitter_types::LeafNode<'tree> for Text<'tree> {
868    fn text(&self) -> &'tree str {
869        self.text
870    }
871}
872impl ::treesitter_types::Spanned for Text<'_> {
873    fn span(&self) -> ::treesitter_types::Span {
874        self.span
875    }
876}
877#[derive(Debug, Clone)]
878pub enum AttributeChildren<'tree> {
879    AttributeName(::std::boxed::Box<AttributeName<'tree>>),
880    AttributeValue(::std::boxed::Box<AttributeValue<'tree>>),
881    QuotedAttributeValue(::std::boxed::Box<QuotedAttributeValue<'tree>>),
882}
883impl<'tree> ::treesitter_types::FromNode<'tree> for AttributeChildren<'tree> {
884    #[allow(clippy::collapsible_else_if)]
885    fn from_node(
886        node: ::tree_sitter::Node<'tree>,
887        src: &'tree [u8],
888    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
889        match node.kind() {
890            "attribute_name" => Ok(Self::AttributeName(::std::boxed::Box::new(
891                <AttributeName as ::treesitter_types::FromNode>::from_node(node, src)?,
892            ))),
893            "attribute_value" => Ok(Self::AttributeValue(::std::boxed::Box::new(
894                <AttributeValue as ::treesitter_types::FromNode>::from_node(node, src)?,
895            ))),
896            "quoted_attribute_value" => Ok(Self::QuotedAttributeValue(::std::boxed::Box::new(
897                <QuotedAttributeValue as ::treesitter_types::FromNode>::from_node(node, src)?,
898            ))),
899            other => Err(::treesitter_types::ParseError::unexpected_kind(other, node)),
900        }
901    }
902}
903impl ::treesitter_types::Spanned for AttributeChildren<'_> {
904    fn span(&self) -> ::treesitter_types::Span {
905        match self {
906            Self::AttributeName(inner) => inner.span(),
907            Self::AttributeValue(inner) => inner.span(),
908            Self::QuotedAttributeValue(inner) => inner.span(),
909        }
910    }
911}
912#[derive(Debug, Clone)]
913pub enum DocumentChildren<'tree> {
914    Doctype(::std::boxed::Box<Doctype<'tree>>),
915    Element(::std::boxed::Box<Element<'tree>>),
916    Entity(::std::boxed::Box<Entity<'tree>>),
917    ErroneousEndTag(::std::boxed::Box<ErroneousEndTag<'tree>>),
918    ScriptElement(::std::boxed::Box<ScriptElement<'tree>>),
919    StyleElement(::std::boxed::Box<StyleElement<'tree>>),
920    Text(::std::boxed::Box<Text<'tree>>),
921}
922impl<'tree> ::treesitter_types::FromNode<'tree> for DocumentChildren<'tree> {
923    #[allow(clippy::collapsible_else_if)]
924    fn from_node(
925        node: ::tree_sitter::Node<'tree>,
926        src: &'tree [u8],
927    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
928        match node.kind() {
929            "doctype" => Ok(Self::Doctype(::std::boxed::Box::new(
930                <Doctype as ::treesitter_types::FromNode>::from_node(node, src)?,
931            ))),
932            "element" => Ok(Self::Element(::std::boxed::Box::new(
933                <Element as ::treesitter_types::FromNode>::from_node(node, src)?,
934            ))),
935            "entity" => Ok(Self::Entity(::std::boxed::Box::new(
936                <Entity as ::treesitter_types::FromNode>::from_node(node, src)?,
937            ))),
938            "erroneous_end_tag" => Ok(Self::ErroneousEndTag(::std::boxed::Box::new(
939                <ErroneousEndTag as ::treesitter_types::FromNode>::from_node(node, src)?,
940            ))),
941            "script_element" => Ok(Self::ScriptElement(::std::boxed::Box::new(
942                <ScriptElement as ::treesitter_types::FromNode>::from_node(node, src)?,
943            ))),
944            "style_element" => Ok(Self::StyleElement(::std::boxed::Box::new(
945                <StyleElement as ::treesitter_types::FromNode>::from_node(node, src)?,
946            ))),
947            "text" => Ok(Self::Text(::std::boxed::Box::new(
948                <Text as ::treesitter_types::FromNode>::from_node(node, src)?,
949            ))),
950            other => Err(::treesitter_types::ParseError::unexpected_kind(other, node)),
951        }
952    }
953}
954impl ::treesitter_types::Spanned for DocumentChildren<'_> {
955    fn span(&self) -> ::treesitter_types::Span {
956        match self {
957            Self::Doctype(inner) => inner.span(),
958            Self::Element(inner) => inner.span(),
959            Self::Entity(inner) => inner.span(),
960            Self::ErroneousEndTag(inner) => inner.span(),
961            Self::ScriptElement(inner) => inner.span(),
962            Self::StyleElement(inner) => inner.span(),
963            Self::Text(inner) => inner.span(),
964        }
965    }
966}
967#[derive(Debug, Clone)]
968pub enum ElementChildren<'tree> {
969    Doctype(::std::boxed::Box<Doctype<'tree>>),
970    Element(::std::boxed::Box<Element<'tree>>),
971    EndTag(::std::boxed::Box<EndTag<'tree>>),
972    Entity(::std::boxed::Box<Entity<'tree>>),
973    ErroneousEndTag(::std::boxed::Box<ErroneousEndTag<'tree>>),
974    ScriptElement(::std::boxed::Box<ScriptElement<'tree>>),
975    SelfClosingTag(::std::boxed::Box<SelfClosingTag<'tree>>),
976    StartTag(::std::boxed::Box<StartTag<'tree>>),
977    StyleElement(::std::boxed::Box<StyleElement<'tree>>),
978    Text(::std::boxed::Box<Text<'tree>>),
979}
980impl<'tree> ::treesitter_types::FromNode<'tree> for ElementChildren<'tree> {
981    #[allow(clippy::collapsible_else_if)]
982    fn from_node(
983        node: ::tree_sitter::Node<'tree>,
984        src: &'tree [u8],
985    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
986        match node.kind() {
987            "doctype" => Ok(Self::Doctype(::std::boxed::Box::new(
988                <Doctype as ::treesitter_types::FromNode>::from_node(node, src)?,
989            ))),
990            "element" => Ok(Self::Element(::std::boxed::Box::new(
991                <Element as ::treesitter_types::FromNode>::from_node(node, src)?,
992            ))),
993            "end_tag" => Ok(Self::EndTag(::std::boxed::Box::new(
994                <EndTag as ::treesitter_types::FromNode>::from_node(node, src)?,
995            ))),
996            "entity" => Ok(Self::Entity(::std::boxed::Box::new(
997                <Entity as ::treesitter_types::FromNode>::from_node(node, src)?,
998            ))),
999            "erroneous_end_tag" => Ok(Self::ErroneousEndTag(::std::boxed::Box::new(
1000                <ErroneousEndTag as ::treesitter_types::FromNode>::from_node(node, src)?,
1001            ))),
1002            "script_element" => Ok(Self::ScriptElement(::std::boxed::Box::new(
1003                <ScriptElement as ::treesitter_types::FromNode>::from_node(node, src)?,
1004            ))),
1005            "self_closing_tag" => Ok(Self::SelfClosingTag(::std::boxed::Box::new(
1006                <SelfClosingTag as ::treesitter_types::FromNode>::from_node(node, src)?,
1007            ))),
1008            "start_tag" => Ok(Self::StartTag(::std::boxed::Box::new(
1009                <StartTag as ::treesitter_types::FromNode>::from_node(node, src)?,
1010            ))),
1011            "style_element" => Ok(Self::StyleElement(::std::boxed::Box::new(
1012                <StyleElement as ::treesitter_types::FromNode>::from_node(node, src)?,
1013            ))),
1014            "text" => Ok(Self::Text(::std::boxed::Box::new(
1015                <Text as ::treesitter_types::FromNode>::from_node(node, src)?,
1016            ))),
1017            other => Err(::treesitter_types::ParseError::unexpected_kind(other, node)),
1018        }
1019    }
1020}
1021impl ::treesitter_types::Spanned for ElementChildren<'_> {
1022    fn span(&self) -> ::treesitter_types::Span {
1023        match self {
1024            Self::Doctype(inner) => inner.span(),
1025            Self::Element(inner) => inner.span(),
1026            Self::EndTag(inner) => inner.span(),
1027            Self::Entity(inner) => inner.span(),
1028            Self::ErroneousEndTag(inner) => inner.span(),
1029            Self::ScriptElement(inner) => inner.span(),
1030            Self::SelfClosingTag(inner) => inner.span(),
1031            Self::StartTag(inner) => inner.span(),
1032            Self::StyleElement(inner) => inner.span(),
1033            Self::Text(inner) => inner.span(),
1034        }
1035    }
1036}
1037#[derive(Debug, Clone)]
1038pub enum ScriptElementChildren<'tree> {
1039    EndTag(::std::boxed::Box<EndTag<'tree>>),
1040    RawText(::std::boxed::Box<RawText<'tree>>),
1041    StartTag(::std::boxed::Box<StartTag<'tree>>),
1042}
1043impl<'tree> ::treesitter_types::FromNode<'tree> for ScriptElementChildren<'tree> {
1044    #[allow(clippy::collapsible_else_if)]
1045    fn from_node(
1046        node: ::tree_sitter::Node<'tree>,
1047        src: &'tree [u8],
1048    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
1049        match node.kind() {
1050            "end_tag" => Ok(Self::EndTag(::std::boxed::Box::new(
1051                <EndTag as ::treesitter_types::FromNode>::from_node(node, src)?,
1052            ))),
1053            "raw_text" => Ok(Self::RawText(::std::boxed::Box::new(
1054                <RawText as ::treesitter_types::FromNode>::from_node(node, src)?,
1055            ))),
1056            "start_tag" => Ok(Self::StartTag(::std::boxed::Box::new(
1057                <StartTag as ::treesitter_types::FromNode>::from_node(node, src)?,
1058            ))),
1059            other => Err(::treesitter_types::ParseError::unexpected_kind(other, node)),
1060        }
1061    }
1062}
1063impl ::treesitter_types::Spanned for ScriptElementChildren<'_> {
1064    fn span(&self) -> ::treesitter_types::Span {
1065        match self {
1066            Self::EndTag(inner) => inner.span(),
1067            Self::RawText(inner) => inner.span(),
1068            Self::StartTag(inner) => inner.span(),
1069        }
1070    }
1071}
1072#[derive(Debug, Clone)]
1073pub enum SelfClosingTagChildren<'tree> {
1074    Attribute(::std::boxed::Box<Attribute<'tree>>),
1075    TagName(::std::boxed::Box<TagName<'tree>>),
1076}
1077impl<'tree> ::treesitter_types::FromNode<'tree> for SelfClosingTagChildren<'tree> {
1078    #[allow(clippy::collapsible_else_if)]
1079    fn from_node(
1080        node: ::tree_sitter::Node<'tree>,
1081        src: &'tree [u8],
1082    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
1083        match node.kind() {
1084            "attribute" => Ok(Self::Attribute(::std::boxed::Box::new(
1085                <Attribute as ::treesitter_types::FromNode>::from_node(node, src)?,
1086            ))),
1087            "tag_name" => Ok(Self::TagName(::std::boxed::Box::new(
1088                <TagName as ::treesitter_types::FromNode>::from_node(node, src)?,
1089            ))),
1090            other => Err(::treesitter_types::ParseError::unexpected_kind(other, node)),
1091        }
1092    }
1093}
1094impl ::treesitter_types::Spanned for SelfClosingTagChildren<'_> {
1095    fn span(&self) -> ::treesitter_types::Span {
1096        match self {
1097            Self::Attribute(inner) => inner.span(),
1098            Self::TagName(inner) => inner.span(),
1099        }
1100    }
1101}
1102#[derive(Debug, Clone)]
1103pub enum StartTagChildren<'tree> {
1104    Attribute(::std::boxed::Box<Attribute<'tree>>),
1105    TagName(::std::boxed::Box<TagName<'tree>>),
1106}
1107impl<'tree> ::treesitter_types::FromNode<'tree> for StartTagChildren<'tree> {
1108    #[allow(clippy::collapsible_else_if)]
1109    fn from_node(
1110        node: ::tree_sitter::Node<'tree>,
1111        src: &'tree [u8],
1112    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
1113        match node.kind() {
1114            "attribute" => Ok(Self::Attribute(::std::boxed::Box::new(
1115                <Attribute as ::treesitter_types::FromNode>::from_node(node, src)?,
1116            ))),
1117            "tag_name" => Ok(Self::TagName(::std::boxed::Box::new(
1118                <TagName as ::treesitter_types::FromNode>::from_node(node, src)?,
1119            ))),
1120            other => Err(::treesitter_types::ParseError::unexpected_kind(other, node)),
1121        }
1122    }
1123}
1124impl ::treesitter_types::Spanned for StartTagChildren<'_> {
1125    fn span(&self) -> ::treesitter_types::Span {
1126        match self {
1127            Self::Attribute(inner) => inner.span(),
1128            Self::TagName(inner) => inner.span(),
1129        }
1130    }
1131}
1132#[derive(Debug, Clone)]
1133pub enum StyleElementChildren<'tree> {
1134    EndTag(::std::boxed::Box<EndTag<'tree>>),
1135    RawText(::std::boxed::Box<RawText<'tree>>),
1136    StartTag(::std::boxed::Box<StartTag<'tree>>),
1137}
1138impl<'tree> ::treesitter_types::FromNode<'tree> for StyleElementChildren<'tree> {
1139    #[allow(clippy::collapsible_else_if)]
1140    fn from_node(
1141        node: ::tree_sitter::Node<'tree>,
1142        src: &'tree [u8],
1143    ) -> ::core::result::Result<Self, ::treesitter_types::ParseError> {
1144        match node.kind() {
1145            "end_tag" => Ok(Self::EndTag(::std::boxed::Box::new(
1146                <EndTag as ::treesitter_types::FromNode>::from_node(node, src)?,
1147            ))),
1148            "raw_text" => Ok(Self::RawText(::std::boxed::Box::new(
1149                <RawText as ::treesitter_types::FromNode>::from_node(node, src)?,
1150            ))),
1151            "start_tag" => Ok(Self::StartTag(::std::boxed::Box::new(
1152                <StartTag as ::treesitter_types::FromNode>::from_node(node, src)?,
1153            ))),
1154            other => Err(::treesitter_types::ParseError::unexpected_kind(other, node)),
1155        }
1156    }
1157}
1158impl ::treesitter_types::Spanned for StyleElementChildren<'_> {
1159    fn span(&self) -> ::treesitter_types::Span {
1160        match self {
1161            Self::EndTag(inner) => inner.span(),
1162            Self::RawText(inner) => inner.span(),
1163            Self::StartTag(inner) => inner.span(),
1164        }
1165    }
1166}
1167#[derive(Debug, Clone)]
1168pub enum AnyNode<'tree> {
1169    Attribute(Attribute<'tree>),
1170    Doctype(Doctype<'tree>),
1171    Document(Document<'tree>),
1172    Element(Element<'tree>),
1173    EndTag(EndTag<'tree>),
1174    ErroneousEndTag(ErroneousEndTag<'tree>),
1175    QuotedAttributeValue(QuotedAttributeValue<'tree>),
1176    ScriptElement(ScriptElement<'tree>),
1177    SelfClosingTag(SelfClosingTag<'tree>),
1178    StartTag(StartTag<'tree>),
1179    StyleElement(StyleElement<'tree>),
1180    AttributeName(AttributeName<'tree>),
1181    AttributeValue(AttributeValue<'tree>),
1182    Comment(Comment<'tree>),
1183    Entity(Entity<'tree>),
1184    ErroneousEndTagName(ErroneousEndTagName<'tree>),
1185    RawText(RawText<'tree>),
1186    TagName(TagName<'tree>),
1187    Text(Text<'tree>),
1188    Unknown(::tree_sitter::Node<'tree>),
1189}
1190impl<'tree> AnyNode<'tree> {
1191    pub fn from_node(node: ::tree_sitter::Node<'tree>, src: &'tree [u8]) -> Self {
1192        match node.kind() {
1193            "attribute" => <Attribute as ::treesitter_types::FromNode>::from_node(node, src)
1194                .map(Self::Attribute)
1195                .unwrap_or(Self::Unknown(node)),
1196            "doctype" => <Doctype as ::treesitter_types::FromNode>::from_node(node, src)
1197                .map(Self::Doctype)
1198                .unwrap_or(Self::Unknown(node)),
1199            "document" => <Document as ::treesitter_types::FromNode>::from_node(node, src)
1200                .map(Self::Document)
1201                .unwrap_or(Self::Unknown(node)),
1202            "element" => <Element as ::treesitter_types::FromNode>::from_node(node, src)
1203                .map(Self::Element)
1204                .unwrap_or(Self::Unknown(node)),
1205            "end_tag" => <EndTag as ::treesitter_types::FromNode>::from_node(node, src)
1206                .map(Self::EndTag)
1207                .unwrap_or(Self::Unknown(node)),
1208            "erroneous_end_tag" => {
1209                <ErroneousEndTag as ::treesitter_types::FromNode>::from_node(node, src)
1210                    .map(Self::ErroneousEndTag)
1211                    .unwrap_or(Self::Unknown(node))
1212            }
1213            "quoted_attribute_value" => {
1214                <QuotedAttributeValue as ::treesitter_types::FromNode>::from_node(node, src)
1215                    .map(Self::QuotedAttributeValue)
1216                    .unwrap_or(Self::Unknown(node))
1217            }
1218            "script_element" => {
1219                <ScriptElement as ::treesitter_types::FromNode>::from_node(node, src)
1220                    .map(Self::ScriptElement)
1221                    .unwrap_or(Self::Unknown(node))
1222            }
1223            "self_closing_tag" => {
1224                <SelfClosingTag as ::treesitter_types::FromNode>::from_node(node, src)
1225                    .map(Self::SelfClosingTag)
1226                    .unwrap_or(Self::Unknown(node))
1227            }
1228            "start_tag" => <StartTag as ::treesitter_types::FromNode>::from_node(node, src)
1229                .map(Self::StartTag)
1230                .unwrap_or(Self::Unknown(node)),
1231            "style_element" => <StyleElement as ::treesitter_types::FromNode>::from_node(node, src)
1232                .map(Self::StyleElement)
1233                .unwrap_or(Self::Unknown(node)),
1234            "attribute_name" => {
1235                <AttributeName as ::treesitter_types::FromNode>::from_node(node, src)
1236                    .map(Self::AttributeName)
1237                    .unwrap_or(Self::Unknown(node))
1238            }
1239            "attribute_value" => {
1240                <AttributeValue as ::treesitter_types::FromNode>::from_node(node, src)
1241                    .map(Self::AttributeValue)
1242                    .unwrap_or(Self::Unknown(node))
1243            }
1244            "comment" => <Comment as ::treesitter_types::FromNode>::from_node(node, src)
1245                .map(Self::Comment)
1246                .unwrap_or(Self::Unknown(node)),
1247            "entity" => <Entity as ::treesitter_types::FromNode>::from_node(node, src)
1248                .map(Self::Entity)
1249                .unwrap_or(Self::Unknown(node)),
1250            "erroneous_end_tag_name" => {
1251                <ErroneousEndTagName as ::treesitter_types::FromNode>::from_node(node, src)
1252                    .map(Self::ErroneousEndTagName)
1253                    .unwrap_or(Self::Unknown(node))
1254            }
1255            "raw_text" => <RawText as ::treesitter_types::FromNode>::from_node(node, src)
1256                .map(Self::RawText)
1257                .unwrap_or(Self::Unknown(node)),
1258            "tag_name" => <TagName as ::treesitter_types::FromNode>::from_node(node, src)
1259                .map(Self::TagName)
1260                .unwrap_or(Self::Unknown(node)),
1261            "text" => <Text as ::treesitter_types::FromNode>::from_node(node, src)
1262                .map(Self::Text)
1263                .unwrap_or(Self::Unknown(node)),
1264            _ => Self::Unknown(node),
1265        }
1266    }
1267}
1268impl ::treesitter_types::Spanned for AnyNode<'_> {
1269    fn span(&self) -> ::treesitter_types::Span {
1270        match self {
1271            Self::Attribute(inner) => inner.span(),
1272            Self::Doctype(inner) => inner.span(),
1273            Self::Document(inner) => inner.span(),
1274            Self::Element(inner) => inner.span(),
1275            Self::EndTag(inner) => inner.span(),
1276            Self::ErroneousEndTag(inner) => inner.span(),
1277            Self::QuotedAttributeValue(inner) => inner.span(),
1278            Self::ScriptElement(inner) => inner.span(),
1279            Self::SelfClosingTag(inner) => inner.span(),
1280            Self::StartTag(inner) => inner.span(),
1281            Self::StyleElement(inner) => inner.span(),
1282            Self::AttributeName(inner) => inner.span(),
1283            Self::AttributeValue(inner) => inner.span(),
1284            Self::Comment(inner) => inner.span(),
1285            Self::Entity(inner) => inner.span(),
1286            Self::ErroneousEndTagName(inner) => inner.span(),
1287            Self::RawText(inner) => inner.span(),
1288            Self::TagName(inner) => inner.span(),
1289            Self::Text(inner) => inner.span(),
1290            Self::Unknown(node) => ::treesitter_types::Span::from(*node),
1291        }
1292    }
1293}