eure_tree/
node_kind.rs

1//! This file was generated by `eure-gen`.
2//! Do not edit manually.
3#[allow(dead_code)]
4#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
5pub enum NonTerminalKind {
6    Array,
7    ArrayBegin,
8    ArrayElements,
9    ArrayElementsOpt,
10    ArrayElementsTail,
11    ArrayElementsTailOpt,
12    ArrayEnd,
13    ArrayMarker,
14    ArrayMarkerOpt,
15    ArrayOpt,
16    At,
17    Backtick1,
18    Backtick2,
19    Backtick3,
20    Backtick4,
21    Backtick5,
22    Begin,
23    Bind,
24    Binding,
25    BindingRhs,
26    Boolean,
27    CodeBlock,
28    CodeBlock3,
29    CodeBlock3List,
30    CodeBlock3ListGroup,
31    CodeBlock4,
32    CodeBlock4List,
33    CodeBlock4ListGroup,
34    CodeBlock5,
35    CodeBlock5List,
36    CodeBlock5ListGroup,
37    CodeBlock6,
38    CodeBlock6List,
39    CodeBlock6ListGroup,
40    CodeBlockEnd3,
41    CodeBlockEnd4,
42    CodeBlockEnd5,
43    CodeBlockEnd6,
44    CodeBlockStart3,
45    CodeBlockStart4,
46    CodeBlockStart5,
47    CodeBlockStart6,
48    Comma,
49    Continue,
50    Dot,
51    End,
52    Eure,
53    EureList,
54    EureList0,
55    EureOpt,
56    Ext,
57    ExtensionNameSpace,
58    False,
59    Float,
60    GrammarNewline,
61    Hole,
62    Ident,
63    Inf,
64    InlineCode,
65    InlineCode1,
66    InlineCode2,
67    InlineCode2List,
68    InlineCode2ListGroup,
69    InlineCodeEnd2,
70    InlineCodeStart2,
71    Integer,
72    Key,
73    KeyBase,
74    KeyIdent,
75    KeyOpt,
76    KeyTuple,
77    KeyTupleElements,
78    KeyTupleElementsOpt,
79    KeyTupleElementsTail,
80    KeyTupleElementsTailOpt,
81    KeyTupleOpt,
82    KeyValue,
83    Keys,
84    KeysList,
85    LParen,
86    MapBind,
87    NaN,
88    NoBacktick,
89    NoBacktickInline,
90    Null,
91    Number,
92    Object,
93    ObjectList,
94    ObjectOpt,
95    ObjectOpt0,
96    ObjectOpt1,
97    RParen,
98    Section,
99    SectionBinding,
100    SectionBody,
101    SectionBodyList,
102    SectionBodyOpt,
103    Str,
104    Strings,
105    StringsList,
106    Text,
107    TextBinding,
108    TextBindingOpt,
109    TextBindingOpt0,
110    TextStart,
111    True,
112    Tuple,
113    TupleElements,
114    TupleElementsOpt,
115    TupleElementsTail,
116    TupleElementsTailOpt,
117    TupleIndex,
118    TupleOpt,
119    Value,
120    ValueBinding,
121    Ws,
122    Root,
123}
124#[allow(dead_code)]
125#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
126pub enum TerminalKind {
127    NewLine,
128    Whitespace,
129    LineComment,
130    BlockComment,
131    Hash,
132    MapBind,
133    Integer,
134    Float,
135    Inf,
136    NaN,
137    True,
138    False,
139    Null,
140    Hole,
141    Str,
142    Text,
143    InlineCode1,
144    InlineCodeStart2,
145    CodeBlockStart3,
146    CodeBlockStart4,
147    CodeBlockStart5,
148    CodeBlockStart6,
149    CodeBlockEnd3,
150    Backtick2,
151    CodeBlockEnd4,
152    Backtick3,
153    CodeBlockEnd5,
154    Backtick4,
155    CodeBlockEnd6,
156    Backtick5,
157    InlineCodeEnd2,
158    Backtick1,
159    NoBacktick,
160    NoBacktickInline,
161    GrammarNewline,
162    Ws,
163    At,
164    Dollar,
165    Dot,
166    LBrace,
167    RBrace,
168    LBracket,
169    RBracket,
170    LParen,
171    RParen,
172    Bind,
173    Comma,
174    Esc,
175    TextStart,
176    Ident,
177}
178#[allow(dead_code)]
179impl TerminalKind {
180    pub fn from_terminal_index(index: u16) -> Self {
181        match index {
182            1 => Self::NewLine,
183            2 => Self::Whitespace,
184            3 => Self::LineComment,
185            4 => Self::BlockComment,
186            5 => Self::Hash,
187            6 => Self::MapBind,
188            7 => Self::Integer,
189            8 => Self::Float,
190            9 => Self::Inf,
191            10 => Self::NaN,
192            11 => Self::True,
193            12 => Self::False,
194            13 => Self::Null,
195            14 => Self::Hole,
196            15 => Self::Str,
197            16 => Self::Text,
198            17 => Self::InlineCode1,
199            18 => Self::InlineCodeStart2,
200            19 => Self::CodeBlockStart3,
201            20 => Self::CodeBlockStart4,
202            21 => Self::CodeBlockStart5,
203            22 => Self::CodeBlockStart6,
204            23 => Self::CodeBlockEnd3,
205            24 => Self::Backtick2,
206            25 => Self::CodeBlockEnd4,
207            26 => Self::Backtick3,
208            27 => Self::CodeBlockEnd5,
209            28 => Self::Backtick4,
210            29 => Self::CodeBlockEnd6,
211            30 => Self::Backtick5,
212            31 => Self::InlineCodeEnd2,
213            32 => Self::Backtick1,
214            33 => Self::NoBacktick,
215            34 => Self::NoBacktickInline,
216            35 => Self::GrammarNewline,
217            36 => Self::Ws,
218            37 => Self::At,
219            38 => Self::Dollar,
220            39 => Self::Dot,
221            40 => Self::LBrace,
222            41 => Self::RBrace,
223            42 => Self::LBracket,
224            43 => Self::RBracket,
225            44 => Self::LParen,
226            45 => Self::RParen,
227            46 => Self::Bind,
228            47 => Self::Comma,
229            48 => Self::Esc,
230            49 => Self::TextStart,
231            50 => Self::Ident,
232            _ => panic!("Invalid terminal index: {}", index),
233        }
234    }
235    pub fn is_builtin_terminal(&self) -> bool {
236        matches!(
237            self,
238            TerminalKind::NewLine
239                | TerminalKind::Whitespace
240                | TerminalKind::LineComment
241                | TerminalKind::BlockComment
242        )
243    }
244    pub fn is_builtin_new_line(&self) -> bool {
245        matches!(self, TerminalKind::NewLine)
246    }
247    pub fn is_builtin_whitespace(&self) -> bool {
248        matches!(self, TerminalKind::Whitespace)
249    }
250    pub fn is_builtin_line_comment(&self) -> bool {
251        matches!(self, TerminalKind::LineComment)
252    }
253    pub fn is_builtin_block_comment(&self) -> bool {
254        matches!(self, TerminalKind::BlockComment)
255    }
256}
257
258#[allow(dead_code)]
259impl NonTerminalKind {
260    pub fn from_non_terminal_name(name: &str) -> Self {
261        match name {
262            "Array" => Self::Array,
263            "ArrayBegin" => Self::ArrayBegin,
264            "ArrayElements" => Self::ArrayElements,
265            "ArrayElementsOpt" => Self::ArrayElementsOpt,
266            "ArrayElementsTail" => Self::ArrayElementsTail,
267            "ArrayElementsTailOpt" => Self::ArrayElementsTailOpt,
268            "ArrayEnd" => Self::ArrayEnd,
269            "ArrayMarker" => Self::ArrayMarker,
270            "ArrayMarkerOpt" => Self::ArrayMarkerOpt,
271            "ArrayOpt" => Self::ArrayOpt,
272            "At" => Self::At,
273            "Backtick1" => Self::Backtick1,
274            "Backtick2" => Self::Backtick2,
275            "Backtick3" => Self::Backtick3,
276            "Backtick4" => Self::Backtick4,
277            "Backtick5" => Self::Backtick5,
278            "Begin" => Self::Begin,
279            "Bind" => Self::Bind,
280            "Binding" => Self::Binding,
281            "BindingRhs" => Self::BindingRhs,
282            "Boolean" => Self::Boolean,
283            "CodeBlock" => Self::CodeBlock,
284            "CodeBlock3" => Self::CodeBlock3,
285            "CodeBlock3List" => Self::CodeBlock3List,
286            "CodeBlock3ListGroup" => Self::CodeBlock3ListGroup,
287            "CodeBlock4" => Self::CodeBlock4,
288            "CodeBlock4List" => Self::CodeBlock4List,
289            "CodeBlock4ListGroup" => Self::CodeBlock4ListGroup,
290            "CodeBlock5" => Self::CodeBlock5,
291            "CodeBlock5List" => Self::CodeBlock5List,
292            "CodeBlock5ListGroup" => Self::CodeBlock5ListGroup,
293            "CodeBlock6" => Self::CodeBlock6,
294            "CodeBlock6List" => Self::CodeBlock6List,
295            "CodeBlock6ListGroup" => Self::CodeBlock6ListGroup,
296            "CodeBlockEnd3" => Self::CodeBlockEnd3,
297            "CodeBlockEnd4" => Self::CodeBlockEnd4,
298            "CodeBlockEnd5" => Self::CodeBlockEnd5,
299            "CodeBlockEnd6" => Self::CodeBlockEnd6,
300            "CodeBlockStart3" => Self::CodeBlockStart3,
301            "CodeBlockStart4" => Self::CodeBlockStart4,
302            "CodeBlockStart5" => Self::CodeBlockStart5,
303            "CodeBlockStart6" => Self::CodeBlockStart6,
304            "Comma" => Self::Comma,
305            "Continue" => Self::Continue,
306            "Dot" => Self::Dot,
307            "End" => Self::End,
308            "Eure" => Self::Eure,
309            "EureList" => Self::EureList,
310            "EureList0" => Self::EureList0,
311            "EureOpt" => Self::EureOpt,
312            "Ext" => Self::Ext,
313            "ExtensionNameSpace" => Self::ExtensionNameSpace,
314            "False" => Self::False,
315            "Float" => Self::Float,
316            "GrammarNewline" => Self::GrammarNewline,
317            "Hole" => Self::Hole,
318            "Ident" => Self::Ident,
319            "Inf" => Self::Inf,
320            "InlineCode" => Self::InlineCode,
321            "InlineCode1" => Self::InlineCode1,
322            "InlineCode2" => Self::InlineCode2,
323            "InlineCode2List" => Self::InlineCode2List,
324            "InlineCode2ListGroup" => Self::InlineCode2ListGroup,
325            "InlineCodeEnd2" => Self::InlineCodeEnd2,
326            "InlineCodeStart2" => Self::InlineCodeStart2,
327            "Integer" => Self::Integer,
328            "Key" => Self::Key,
329            "KeyBase" => Self::KeyBase,
330            "KeyIdent" => Self::KeyIdent,
331            "KeyOpt" => Self::KeyOpt,
332            "KeyTuple" => Self::KeyTuple,
333            "KeyTupleElements" => Self::KeyTupleElements,
334            "KeyTupleElementsOpt" => Self::KeyTupleElementsOpt,
335            "KeyTupleElementsTail" => Self::KeyTupleElementsTail,
336            "KeyTupleElementsTailOpt" => Self::KeyTupleElementsTailOpt,
337            "KeyTupleOpt" => Self::KeyTupleOpt,
338            "KeyValue" => Self::KeyValue,
339            "Keys" => Self::Keys,
340            "KeysList" => Self::KeysList,
341            "LParen" => Self::LParen,
342            "MapBind" => Self::MapBind,
343            "NaN" => Self::NaN,
344            "NoBacktick" => Self::NoBacktick,
345            "NoBacktickInline" => Self::NoBacktickInline,
346            "Null" => Self::Null,
347            "Number" => Self::Number,
348            "Object" => Self::Object,
349            "ObjectList" => Self::ObjectList,
350            "ObjectOpt" => Self::ObjectOpt,
351            "ObjectOpt0" => Self::ObjectOpt0,
352            "ObjectOpt1" => Self::ObjectOpt1,
353            "RParen" => Self::RParen,
354            "Section" => Self::Section,
355            "SectionBinding" => Self::SectionBinding,
356            "SectionBody" => Self::SectionBody,
357            "SectionBodyList" => Self::SectionBodyList,
358            "SectionBodyOpt" => Self::SectionBodyOpt,
359            "Str" => Self::Str,
360            "Strings" => Self::Strings,
361            "StringsList" => Self::StringsList,
362            "Text" => Self::Text,
363            "TextBinding" => Self::TextBinding,
364            "TextBindingOpt" => Self::TextBindingOpt,
365            "TextBindingOpt0" => Self::TextBindingOpt0,
366            "TextStart" => Self::TextStart,
367            "True" => Self::True,
368            "Tuple" => Self::Tuple,
369            "TupleElements" => Self::TupleElements,
370            "TupleElementsOpt" => Self::TupleElementsOpt,
371            "TupleElementsTail" => Self::TupleElementsTail,
372            "TupleElementsTailOpt" => Self::TupleElementsTailOpt,
373            "TupleIndex" => Self::TupleIndex,
374            "TupleOpt" => Self::TupleOpt,
375            "Value" => Self::Value,
376            "ValueBinding" => Self::ValueBinding,
377            "Ws" => Self::Ws,
378            "" => Self::Root,
379            _ => panic!("Invalid non-terminal name: {}", name),
380        }
381    }
382}
383impl std::fmt::Display for TerminalKind {
384    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
385        match self {
386            Self::NewLine => write!(f, stringify!(NewLine)),
387            Self::Whitespace => write!(f, stringify!(Whitespace)),
388            Self::LineComment => write!(f, stringify!(LineComment)),
389            Self::BlockComment => write!(f, stringify!(BlockComment)),
390            Self::Hash => write!(f, stringify!(Hash)),
391            Self::MapBind => write!(f, stringify!(MapBind)),
392            Self::Integer => write!(f, stringify!(Integer)),
393            Self::Float => write!(f, stringify!(Float)),
394            Self::Inf => write!(f, stringify!(Inf)),
395            Self::NaN => write!(f, stringify!(NaN)),
396            Self::True => write!(f, stringify!(True)),
397            Self::False => write!(f, stringify!(False)),
398            Self::Null => write!(f, stringify!(Null)),
399            Self::Hole => write!(f, stringify!(Hole)),
400            Self::Str => write!(f, stringify!(Str)),
401            Self::Text => write!(f, stringify!(Text)),
402            Self::InlineCode1 => write!(f, stringify!(InlineCode1)),
403            Self::InlineCodeStart2 => write!(f, stringify!(InlineCodeStart2)),
404            Self::CodeBlockStart3 => write!(f, stringify!(CodeBlockStart3)),
405            Self::CodeBlockStart4 => write!(f, stringify!(CodeBlockStart4)),
406            Self::CodeBlockStart5 => write!(f, stringify!(CodeBlockStart5)),
407            Self::CodeBlockStart6 => write!(f, stringify!(CodeBlockStart6)),
408            Self::CodeBlockEnd3 => write!(f, stringify!(CodeBlockEnd3)),
409            Self::Backtick2 => write!(f, stringify!(Backtick2)),
410            Self::CodeBlockEnd4 => write!(f, stringify!(CodeBlockEnd4)),
411            Self::Backtick3 => write!(f, stringify!(Backtick3)),
412            Self::CodeBlockEnd5 => write!(f, stringify!(CodeBlockEnd5)),
413            Self::Backtick4 => write!(f, stringify!(Backtick4)),
414            Self::CodeBlockEnd6 => write!(f, stringify!(CodeBlockEnd6)),
415            Self::Backtick5 => write!(f, stringify!(Backtick5)),
416            Self::InlineCodeEnd2 => write!(f, stringify!(InlineCodeEnd2)),
417            Self::Backtick1 => write!(f, stringify!(Backtick1)),
418            Self::NoBacktick => write!(f, stringify!(NoBacktick)),
419            Self::NoBacktickInline => write!(f, stringify!(NoBacktickInline)),
420            Self::GrammarNewline => write!(f, stringify!(GrammarNewline)),
421            Self::Ws => write!(f, stringify!(Ws)),
422            Self::At => write!(f, stringify!(At)),
423            Self::Dollar => write!(f, stringify!(Dollar)),
424            Self::Dot => write!(f, stringify!(Dot)),
425            Self::LBrace => write!(f, stringify!(LBrace)),
426            Self::RBrace => write!(f, stringify!(RBrace)),
427            Self::LBracket => write!(f, stringify!(LBracket)),
428            Self::RBracket => write!(f, stringify!(RBracket)),
429            Self::LParen => write!(f, stringify!(LParen)),
430            Self::RParen => write!(f, stringify!(RParen)),
431            Self::Bind => write!(f, stringify!(Bind)),
432            Self::Comma => write!(f, stringify!(Comma)),
433            Self::Esc => write!(f, stringify!(Esc)),
434            Self::TextStart => write!(f, stringify!(TextStart)),
435            Self::Ident => write!(f, stringify!(Ident)),
436        }
437    }
438}
439
440impl std::fmt::Display for NonTerminalKind {
441    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
442        match self {
443            Self::Array => write!(f, stringify!(Array)),
444            Self::ArrayBegin => write!(f, stringify!(ArrayBegin)),
445            Self::ArrayElements => write!(f, stringify!(ArrayElements)),
446            Self::ArrayElementsOpt => write!(f, stringify!(ArrayElementsOpt)),
447            Self::ArrayElementsTail => write!(f, stringify!(ArrayElementsTail)),
448            Self::ArrayElementsTailOpt => write!(f, stringify!(ArrayElementsTailOpt)),
449            Self::ArrayEnd => write!(f, stringify!(ArrayEnd)),
450            Self::ArrayMarker => write!(f, stringify!(ArrayMarker)),
451            Self::ArrayMarkerOpt => write!(f, stringify!(ArrayMarkerOpt)),
452            Self::ArrayOpt => write!(f, stringify!(ArrayOpt)),
453            Self::At => write!(f, stringify!(At)),
454            Self::Backtick1 => write!(f, stringify!(Backtick1)),
455            Self::Backtick2 => write!(f, stringify!(Backtick2)),
456            Self::Backtick3 => write!(f, stringify!(Backtick3)),
457            Self::Backtick4 => write!(f, stringify!(Backtick4)),
458            Self::Backtick5 => write!(f, stringify!(Backtick5)),
459            Self::Begin => write!(f, stringify!(Begin)),
460            Self::Bind => write!(f, stringify!(Bind)),
461            Self::Binding => write!(f, stringify!(Binding)),
462            Self::BindingRhs => write!(f, stringify!(BindingRhs)),
463            Self::Boolean => write!(f, stringify!(Boolean)),
464            Self::CodeBlock => write!(f, stringify!(CodeBlock)),
465            Self::CodeBlock3 => write!(f, stringify!(CodeBlock3)),
466            Self::CodeBlock3List => write!(f, stringify!(CodeBlock3List)),
467            Self::CodeBlock3ListGroup => write!(f, stringify!(CodeBlock3ListGroup)),
468            Self::CodeBlock4 => write!(f, stringify!(CodeBlock4)),
469            Self::CodeBlock4List => write!(f, stringify!(CodeBlock4List)),
470            Self::CodeBlock4ListGroup => write!(f, stringify!(CodeBlock4ListGroup)),
471            Self::CodeBlock5 => write!(f, stringify!(CodeBlock5)),
472            Self::CodeBlock5List => write!(f, stringify!(CodeBlock5List)),
473            Self::CodeBlock5ListGroup => write!(f, stringify!(CodeBlock5ListGroup)),
474            Self::CodeBlock6 => write!(f, stringify!(CodeBlock6)),
475            Self::CodeBlock6List => write!(f, stringify!(CodeBlock6List)),
476            Self::CodeBlock6ListGroup => write!(f, stringify!(CodeBlock6ListGroup)),
477            Self::CodeBlockEnd3 => write!(f, stringify!(CodeBlockEnd3)),
478            Self::CodeBlockEnd4 => write!(f, stringify!(CodeBlockEnd4)),
479            Self::CodeBlockEnd5 => write!(f, stringify!(CodeBlockEnd5)),
480            Self::CodeBlockEnd6 => write!(f, stringify!(CodeBlockEnd6)),
481            Self::CodeBlockStart3 => write!(f, stringify!(CodeBlockStart3)),
482            Self::CodeBlockStart4 => write!(f, stringify!(CodeBlockStart4)),
483            Self::CodeBlockStart5 => write!(f, stringify!(CodeBlockStart5)),
484            Self::CodeBlockStart6 => write!(f, stringify!(CodeBlockStart6)),
485            Self::Comma => write!(f, stringify!(Comma)),
486            Self::Continue => write!(f, stringify!(Continue)),
487            Self::Dot => write!(f, stringify!(Dot)),
488            Self::End => write!(f, stringify!(End)),
489            Self::Eure => write!(f, stringify!(Eure)),
490            Self::EureList => write!(f, stringify!(EureList)),
491            Self::EureList0 => write!(f, stringify!(EureList0)),
492            Self::EureOpt => write!(f, stringify!(EureOpt)),
493            Self::Ext => write!(f, stringify!(Ext)),
494            Self::ExtensionNameSpace => write!(f, stringify!(ExtensionNameSpace)),
495            Self::False => write!(f, stringify!(False)),
496            Self::Float => write!(f, stringify!(Float)),
497            Self::GrammarNewline => write!(f, stringify!(GrammarNewline)),
498            Self::Hole => write!(f, stringify!(Hole)),
499            Self::Ident => write!(f, stringify!(Ident)),
500            Self::Inf => write!(f, stringify!(Inf)),
501            Self::InlineCode => write!(f, stringify!(InlineCode)),
502            Self::InlineCode1 => write!(f, stringify!(InlineCode1)),
503            Self::InlineCode2 => write!(f, stringify!(InlineCode2)),
504            Self::InlineCode2List => write!(f, stringify!(InlineCode2List)),
505            Self::InlineCode2ListGroup => write!(f, stringify!(InlineCode2ListGroup)),
506            Self::InlineCodeEnd2 => write!(f, stringify!(InlineCodeEnd2)),
507            Self::InlineCodeStart2 => write!(f, stringify!(InlineCodeStart2)),
508            Self::Integer => write!(f, stringify!(Integer)),
509            Self::Key => write!(f, stringify!(Key)),
510            Self::KeyBase => write!(f, stringify!(KeyBase)),
511            Self::KeyIdent => write!(f, stringify!(KeyIdent)),
512            Self::KeyOpt => write!(f, stringify!(KeyOpt)),
513            Self::KeyTuple => write!(f, stringify!(KeyTuple)),
514            Self::KeyTupleElements => write!(f, stringify!(KeyTupleElements)),
515            Self::KeyTupleElementsOpt => write!(f, stringify!(KeyTupleElementsOpt)),
516            Self::KeyTupleElementsTail => write!(f, stringify!(KeyTupleElementsTail)),
517            Self::KeyTupleElementsTailOpt => write!(f, stringify!(KeyTupleElementsTailOpt)),
518            Self::KeyTupleOpt => write!(f, stringify!(KeyTupleOpt)),
519            Self::KeyValue => write!(f, stringify!(KeyValue)),
520            Self::Keys => write!(f, stringify!(Keys)),
521            Self::KeysList => write!(f, stringify!(KeysList)),
522            Self::LParen => write!(f, stringify!(LParen)),
523            Self::MapBind => write!(f, stringify!(MapBind)),
524            Self::NaN => write!(f, stringify!(NaN)),
525            Self::NoBacktick => write!(f, stringify!(NoBacktick)),
526            Self::NoBacktickInline => write!(f, stringify!(NoBacktickInline)),
527            Self::Null => write!(f, stringify!(Null)),
528            Self::Number => write!(f, stringify!(Number)),
529            Self::Object => write!(f, stringify!(Object)),
530            Self::ObjectList => write!(f, stringify!(ObjectList)),
531            Self::ObjectOpt => write!(f, stringify!(ObjectOpt)),
532            Self::ObjectOpt0 => write!(f, stringify!(ObjectOpt0)),
533            Self::ObjectOpt1 => write!(f, stringify!(ObjectOpt1)),
534            Self::RParen => write!(f, stringify!(RParen)),
535            Self::Section => write!(f, stringify!(Section)),
536            Self::SectionBinding => write!(f, stringify!(SectionBinding)),
537            Self::SectionBody => write!(f, stringify!(SectionBody)),
538            Self::SectionBodyList => write!(f, stringify!(SectionBodyList)),
539            Self::SectionBodyOpt => write!(f, stringify!(SectionBodyOpt)),
540            Self::Str => write!(f, stringify!(Str)),
541            Self::Strings => write!(f, stringify!(Strings)),
542            Self::StringsList => write!(f, stringify!(StringsList)),
543            Self::Text => write!(f, stringify!(Text)),
544            Self::TextBinding => write!(f, stringify!(TextBinding)),
545            Self::TextBindingOpt => write!(f, stringify!(TextBindingOpt)),
546            Self::TextBindingOpt0 => write!(f, stringify!(TextBindingOpt0)),
547            Self::TextStart => write!(f, stringify!(TextStart)),
548            Self::True => write!(f, stringify!(True)),
549            Self::Tuple => write!(f, stringify!(Tuple)),
550            Self::TupleElements => write!(f, stringify!(TupleElements)),
551            Self::TupleElementsOpt => write!(f, stringify!(TupleElementsOpt)),
552            Self::TupleElementsTail => write!(f, stringify!(TupleElementsTail)),
553            Self::TupleElementsTailOpt => write!(f, stringify!(TupleElementsTailOpt)),
554            Self::TupleIndex => write!(f, stringify!(TupleIndex)),
555            Self::TupleOpt => write!(f, stringify!(TupleOpt)),
556            Self::Value => write!(f, stringify!(Value)),
557            Self::ValueBinding => write!(f, stringify!(ValueBinding)),
558            Self::Ws => write!(f, stringify!(Ws)),
559            Self::Root => write!(f, stringify!(Root)),
560        }
561    }
562}
563
564#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
565pub enum NodeKind<T, Nt> {
566    Terminal(T),
567    NonTerminal(Nt),
568}