Skip to main content

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    ArrayMarkerOptGroup,
16    ArrayOpt,
17    At,
18    Backtick2,
19    Backtick3,
20    Backtick4,
21    Backtick5,
22    BacktickDelim,
23    Begin,
24    Bind,
25    Binding,
26    BindingRhs,
27    BlockBody,
28    Boolean,
29    Caret,
30    CodeBlock,
31    CodeBlock3,
32    CodeBlock3List,
33    CodeBlock3ListGroup,
34    CodeBlock4,
35    CodeBlock4List,
36    CodeBlock4ListGroup,
37    CodeBlock5,
38    CodeBlock5List,
39    CodeBlock5ListGroup,
40    CodeBlock6,
41    CodeBlock6List,
42    CodeBlock6ListGroup,
43    CodeBlockEnd3,
44    CodeBlockEnd4,
45    CodeBlockEnd5,
46    CodeBlockEnd6,
47    CodeBlockStart3,
48    CodeBlockStart4,
49    CodeBlockStart5,
50    CodeBlockStart6,
51    Comma,
52    Continue,
53    DelimCode,
54    DelimCode1,
55    DelimCode1List,
56    DelimCode1ListGroup,
57    DelimCode2,
58    DelimCode2List,
59    DelimCode2ListGroup,
60    DelimCode3,
61    DelimCode3List,
62    DelimCode3ListGroup,
63    DelimCodeEnd1,
64    DelimCodeEnd2,
65    DelimCodeEnd3,
66    DelimCodeStart1,
67    DelimCodeStart2,
68    DelimCodeStart3,
69    Dot,
70    DotKey,
71    End,
72    Eure,
73    EureList,
74    EureList0,
75    EureOpt,
76    Ext,
77    ExtensionNameSpace,
78    False,
79    FirstKey,
80    FlatBody,
81    FlatBodyList,
82    FlatRootBinding,
83    Float,
84    GrammarNewline,
85    Hole,
86    Ident,
87    Inf,
88    InlineCode,
89    InlineCode1,
90    Integer,
91    Key,
92    KeyIdent,
93    KeyTail,
94    KeyTuple,
95    KeyTupleElements,
96    KeyTupleElementsOpt,
97    KeyTupleElementsTail,
98    KeyTupleElementsTailOpt,
99    KeyTupleOpt,
100    KeyValue,
101    Keys,
102    KeysList,
103    LParen,
104    LitStr,
105    LitStr1,
106    LitStr1End,
107    LitStr1List,
108    LitStr1ListGroup,
109    LitStr1Start,
110    LitStr2,
111    LitStr2End,
112    LitStr2List,
113    LitStr2ListGroup,
114    LitStr2Start,
115    LitStr3,
116    LitStr3End,
117    LitStr3List,
118    LitStr3ListGroup,
119    LitStr3Start,
120    MapBind,
121    NaN,
122    NewlineBind,
123    NewlineHead,
124    NewlineHeadOpt,
125    NewlineTextStart,
126    NoBacktick,
127    NoSQuote,
128    Null,
129    Number,
130    Object,
131    ObjectList,
132    ObjectOpt,
133    ObjectOpt0,
134    ObjectOpt1,
135    RParen,
136    RootBinding,
137    RootTextBinding,
138    RootTextBindingOpt,
139    RootTextBindingOpt0,
140    RootTextBindingOpt1,
141    RootValueBinding,
142    SQuote,
143    Section,
144    SectionBinding,
145    SectionBody,
146    SectionBodyOpt,
147    SectionHead,
148    Str,
149    String,
150    Strings,
151    StringsList,
152    Text,
153    TextBinding,
154    TextBindingOpt,
155    TextBindingOpt0,
156    TextBindingOpt1,
157    TextStart,
158    TopLevelBinding,
159    True,
160    Tuple,
161    TupleElements,
162    TupleElementsOpt,
163    TupleElementsTail,
164    TupleElementsTailOpt,
165    TupleIndex,
166    TupleOpt,
167    Value,
168    ValueBinding,
169    Ws,
170    Root,
171}
172#[allow(dead_code)]
173#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
174pub enum TerminalKind {
175    NewLine,
176    Whitespace,
177    LineComment,
178    BlockComment,
179    Hash,
180    MapBind,
181    Integer,
182    Float,
183    Inf,
184    NaN,
185    True,
186    False,
187    Null,
188    Hole,
189    Str,
190    LitStr,
191    Text,
192    InlineCode1,
193    LitStr3Start,
194    LitStr2Start,
195    LitStr1Start,
196    DelimCodeStart3,
197    DelimCodeStart2,
198    DelimCodeStart1,
199    CodeBlockStart3,
200    CodeBlockStart4,
201    CodeBlockStart5,
202    CodeBlockStart6,
203    CodeBlockEnd3,
204    Backtick2,
205    CodeBlockEnd4,
206    Backtick3,
207    CodeBlockEnd5,
208    Backtick4,
209    CodeBlockEnd6,
210    Backtick5,
211    NoBacktick,
212    LitStr3End,
213    LitStr2End,
214    LitStr1End,
215    SQuote,
216    NoSQuote,
217    DelimCodeEnd3,
218    DelimCodeEnd2,
219    DelimCodeEnd1,
220    BacktickDelim,
221    GrammarNewline,
222    Ws,
223    At,
224    Dollar,
225    Dot,
226    LBrace,
227    RBrace,
228    LBracket,
229    RBracket,
230    Circumflex,
231    LParen,
232    RParen,
233    NewlineBind,
234    Bind,
235    Comma,
236    Esc,
237    NewlineTextStart,
238    TextStart,
239    Ident,
240}
241#[allow(dead_code)]
242impl TerminalKind {
243    pub fn from_terminal_index(index: u16) -> Self {
244        match index {
245            1 => Self::NewLine,
246            2 => Self::Whitespace,
247            3 => Self::LineComment,
248            4 => Self::BlockComment,
249            5 => Self::Hash,
250            6 => Self::MapBind,
251            7 => Self::Integer,
252            8 => Self::Float,
253            9 => Self::Inf,
254            10 => Self::NaN,
255            11 => Self::True,
256            12 => Self::False,
257            13 => Self::Null,
258            14 => Self::Hole,
259            15 => Self::Str,
260            16 => Self::LitStr,
261            17 => Self::Text,
262            18 => Self::InlineCode1,
263            19 => Self::LitStr3Start,
264            20 => Self::LitStr2Start,
265            21 => Self::LitStr1Start,
266            22 => Self::DelimCodeStart3,
267            23 => Self::DelimCodeStart2,
268            24 => Self::DelimCodeStart1,
269            25 => Self::CodeBlockStart3,
270            26 => Self::CodeBlockStart4,
271            27 => Self::CodeBlockStart5,
272            28 => Self::CodeBlockStart6,
273            29 => Self::CodeBlockEnd3,
274            30 => Self::Backtick2,
275            31 => Self::CodeBlockEnd4,
276            32 => Self::Backtick3,
277            33 => Self::CodeBlockEnd5,
278            34 => Self::Backtick4,
279            35 => Self::CodeBlockEnd6,
280            36 => Self::Backtick5,
281            37 => Self::NoBacktick,
282            38 => Self::LitStr3End,
283            39 => Self::LitStr2End,
284            40 => Self::LitStr1End,
285            41 => Self::SQuote,
286            42 => Self::NoSQuote,
287            43 => Self::DelimCodeEnd3,
288            44 => Self::DelimCodeEnd2,
289            45 => Self::DelimCodeEnd1,
290            46 => Self::BacktickDelim,
291            47 => Self::GrammarNewline,
292            48 => Self::Ws,
293            49 => Self::At,
294            50 => Self::Dollar,
295            51 => Self::Dot,
296            52 => Self::LBrace,
297            53 => Self::RBrace,
298            54 => Self::LBracket,
299            55 => Self::RBracket,
300            56 => Self::Circumflex,
301            57 => Self::LParen,
302            58 => Self::RParen,
303            59 => Self::NewlineBind,
304            60 => Self::Bind,
305            61 => Self::Comma,
306            62 => Self::Esc,
307            63 => Self::NewlineTextStart,
308            64 => Self::TextStart,
309            65 => Self::Ident,
310            _ => panic!("Invalid terminal index: {}", index),
311        }
312    }
313    pub fn is_builtin_terminal(&self) -> bool {
314        matches!(
315            self,
316            TerminalKind::NewLine
317                | TerminalKind::Whitespace
318                | TerminalKind::LineComment
319                | TerminalKind::BlockComment
320        )
321    }
322    pub fn is_builtin_new_line(&self) -> bool {
323        matches!(self, TerminalKind::NewLine)
324    }
325    pub fn is_builtin_whitespace(&self) -> bool {
326        matches!(self, TerminalKind::Whitespace)
327    }
328    pub fn is_builtin_line_comment(&self) -> bool {
329        matches!(self, TerminalKind::LineComment)
330    }
331    pub fn is_builtin_block_comment(&self) -> bool {
332        matches!(self, TerminalKind::BlockComment)
333    }
334}
335
336#[allow(dead_code)]
337impl NonTerminalKind {
338    pub fn from_non_terminal_name(name: &str) -> Self {
339        match name {
340            "Array" => Self::Array,
341            "ArrayBegin" => Self::ArrayBegin,
342            "ArrayElements" => Self::ArrayElements,
343            "ArrayElementsOpt" => Self::ArrayElementsOpt,
344            "ArrayElementsTail" => Self::ArrayElementsTail,
345            "ArrayElementsTailOpt" => Self::ArrayElementsTailOpt,
346            "ArrayEnd" => Self::ArrayEnd,
347            "ArrayMarker" => Self::ArrayMarker,
348            "ArrayMarkerOpt" => Self::ArrayMarkerOpt,
349            "ArrayMarkerOptGroup" => Self::ArrayMarkerOptGroup,
350            "ArrayOpt" => Self::ArrayOpt,
351            "At" => Self::At,
352            "Backtick2" => Self::Backtick2,
353            "Backtick3" => Self::Backtick3,
354            "Backtick4" => Self::Backtick4,
355            "Backtick5" => Self::Backtick5,
356            "BacktickDelim" => Self::BacktickDelim,
357            "Begin" => Self::Begin,
358            "Bind" => Self::Bind,
359            "Binding" => Self::Binding,
360            "BindingRhs" => Self::BindingRhs,
361            "BlockBody" => Self::BlockBody,
362            "Boolean" => Self::Boolean,
363            "Caret" => Self::Caret,
364            "CodeBlock" => Self::CodeBlock,
365            "CodeBlock3" => Self::CodeBlock3,
366            "CodeBlock3List" => Self::CodeBlock3List,
367            "CodeBlock3ListGroup" => Self::CodeBlock3ListGroup,
368            "CodeBlock4" => Self::CodeBlock4,
369            "CodeBlock4List" => Self::CodeBlock4List,
370            "CodeBlock4ListGroup" => Self::CodeBlock4ListGroup,
371            "CodeBlock5" => Self::CodeBlock5,
372            "CodeBlock5List" => Self::CodeBlock5List,
373            "CodeBlock5ListGroup" => Self::CodeBlock5ListGroup,
374            "CodeBlock6" => Self::CodeBlock6,
375            "CodeBlock6List" => Self::CodeBlock6List,
376            "CodeBlock6ListGroup" => Self::CodeBlock6ListGroup,
377            "CodeBlockEnd3" => Self::CodeBlockEnd3,
378            "CodeBlockEnd4" => Self::CodeBlockEnd4,
379            "CodeBlockEnd5" => Self::CodeBlockEnd5,
380            "CodeBlockEnd6" => Self::CodeBlockEnd6,
381            "CodeBlockStart3" => Self::CodeBlockStart3,
382            "CodeBlockStart4" => Self::CodeBlockStart4,
383            "CodeBlockStart5" => Self::CodeBlockStart5,
384            "CodeBlockStart6" => Self::CodeBlockStart6,
385            "Comma" => Self::Comma,
386            "Continue" => Self::Continue,
387            "DelimCode" => Self::DelimCode,
388            "DelimCode1" => Self::DelimCode1,
389            "DelimCode1List" => Self::DelimCode1List,
390            "DelimCode1ListGroup" => Self::DelimCode1ListGroup,
391            "DelimCode2" => Self::DelimCode2,
392            "DelimCode2List" => Self::DelimCode2List,
393            "DelimCode2ListGroup" => Self::DelimCode2ListGroup,
394            "DelimCode3" => Self::DelimCode3,
395            "DelimCode3List" => Self::DelimCode3List,
396            "DelimCode3ListGroup" => Self::DelimCode3ListGroup,
397            "DelimCodeEnd1" => Self::DelimCodeEnd1,
398            "DelimCodeEnd2" => Self::DelimCodeEnd2,
399            "DelimCodeEnd3" => Self::DelimCodeEnd3,
400            "DelimCodeStart1" => Self::DelimCodeStart1,
401            "DelimCodeStart2" => Self::DelimCodeStart2,
402            "DelimCodeStart3" => Self::DelimCodeStart3,
403            "Dot" => Self::Dot,
404            "DotKey" => Self::DotKey,
405            "End" => Self::End,
406            "Eure" => Self::Eure,
407            "EureList" => Self::EureList,
408            "EureList0" => Self::EureList0,
409            "EureOpt" => Self::EureOpt,
410            "Ext" => Self::Ext,
411            "ExtensionNameSpace" => Self::ExtensionNameSpace,
412            "False" => Self::False,
413            "FirstKey" => Self::FirstKey,
414            "FlatBody" => Self::FlatBody,
415            "FlatBodyList" => Self::FlatBodyList,
416            "FlatRootBinding" => Self::FlatRootBinding,
417            "Float" => Self::Float,
418            "GrammarNewline" => Self::GrammarNewline,
419            "Hole" => Self::Hole,
420            "Ident" => Self::Ident,
421            "Inf" => Self::Inf,
422            "InlineCode" => Self::InlineCode,
423            "InlineCode1" => Self::InlineCode1,
424            "Integer" => Self::Integer,
425            "Key" => Self::Key,
426            "KeyIdent" => Self::KeyIdent,
427            "KeyTail" => Self::KeyTail,
428            "KeyTuple" => Self::KeyTuple,
429            "KeyTupleElements" => Self::KeyTupleElements,
430            "KeyTupleElementsOpt" => Self::KeyTupleElementsOpt,
431            "KeyTupleElementsTail" => Self::KeyTupleElementsTail,
432            "KeyTupleElementsTailOpt" => Self::KeyTupleElementsTailOpt,
433            "KeyTupleOpt" => Self::KeyTupleOpt,
434            "KeyValue" => Self::KeyValue,
435            "Keys" => Self::Keys,
436            "KeysList" => Self::KeysList,
437            "LParen" => Self::LParen,
438            "LitStr" => Self::LitStr,
439            "LitStr1" => Self::LitStr1,
440            "LitStr1End" => Self::LitStr1End,
441            "LitStr1List" => Self::LitStr1List,
442            "LitStr1ListGroup" => Self::LitStr1ListGroup,
443            "LitStr1Start" => Self::LitStr1Start,
444            "LitStr2" => Self::LitStr2,
445            "LitStr2End" => Self::LitStr2End,
446            "LitStr2List" => Self::LitStr2List,
447            "LitStr2ListGroup" => Self::LitStr2ListGroup,
448            "LitStr2Start" => Self::LitStr2Start,
449            "LitStr3" => Self::LitStr3,
450            "LitStr3End" => Self::LitStr3End,
451            "LitStr3List" => Self::LitStr3List,
452            "LitStr3ListGroup" => Self::LitStr3ListGroup,
453            "LitStr3Start" => Self::LitStr3Start,
454            "MapBind" => Self::MapBind,
455            "NaN" => Self::NaN,
456            "NewlineBind" => Self::NewlineBind,
457            "NewlineHead" => Self::NewlineHead,
458            "NewlineHeadOpt" => Self::NewlineHeadOpt,
459            "NewlineTextStart" => Self::NewlineTextStart,
460            "NoBacktick" => Self::NoBacktick,
461            "NoSQuote" => Self::NoSQuote,
462            "Null" => Self::Null,
463            "Number" => Self::Number,
464            "Object" => Self::Object,
465            "ObjectList" => Self::ObjectList,
466            "ObjectOpt" => Self::ObjectOpt,
467            "ObjectOpt0" => Self::ObjectOpt0,
468            "ObjectOpt1" => Self::ObjectOpt1,
469            "RParen" => Self::RParen,
470            "RootBinding" => Self::RootBinding,
471            "RootTextBinding" => Self::RootTextBinding,
472            "RootTextBindingOpt" => Self::RootTextBindingOpt,
473            "RootTextBindingOpt0" => Self::RootTextBindingOpt0,
474            "RootTextBindingOpt1" => Self::RootTextBindingOpt1,
475            "RootValueBinding" => Self::RootValueBinding,
476            "SQuote" => Self::SQuote,
477            "Section" => Self::Section,
478            "SectionBinding" => Self::SectionBinding,
479            "SectionBody" => Self::SectionBody,
480            "SectionBodyOpt" => Self::SectionBodyOpt,
481            "SectionHead" => Self::SectionHead,
482            "Str" => Self::Str,
483            "String" => Self::String,
484            "Strings" => Self::Strings,
485            "StringsList" => Self::StringsList,
486            "Text" => Self::Text,
487            "TextBinding" => Self::TextBinding,
488            "TextBindingOpt" => Self::TextBindingOpt,
489            "TextBindingOpt0" => Self::TextBindingOpt0,
490            "TextBindingOpt1" => Self::TextBindingOpt1,
491            "TextStart" => Self::TextStart,
492            "TopLevelBinding" => Self::TopLevelBinding,
493            "True" => Self::True,
494            "Tuple" => Self::Tuple,
495            "TupleElements" => Self::TupleElements,
496            "TupleElementsOpt" => Self::TupleElementsOpt,
497            "TupleElementsTail" => Self::TupleElementsTail,
498            "TupleElementsTailOpt" => Self::TupleElementsTailOpt,
499            "TupleIndex" => Self::TupleIndex,
500            "TupleOpt" => Self::TupleOpt,
501            "Value" => Self::Value,
502            "ValueBinding" => Self::ValueBinding,
503            "Ws" => Self::Ws,
504            "" => Self::Root,
505            _ => panic!("Invalid non-terminal name: {}", name),
506        }
507    }
508}
509impl std::fmt::Display for TerminalKind {
510    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
511        match self {
512            Self::NewLine => write!(f, stringify!(NewLine)),
513            Self::Whitespace => write!(f, stringify!(Whitespace)),
514            Self::LineComment => write!(f, stringify!(LineComment)),
515            Self::BlockComment => write!(f, stringify!(BlockComment)),
516            Self::Hash => write!(f, stringify!(Hash)),
517            Self::MapBind => write!(f, stringify!(MapBind)),
518            Self::Integer => write!(f, stringify!(Integer)),
519            Self::Float => write!(f, stringify!(Float)),
520            Self::Inf => write!(f, stringify!(Inf)),
521            Self::NaN => write!(f, stringify!(NaN)),
522            Self::True => write!(f, stringify!(True)),
523            Self::False => write!(f, stringify!(False)),
524            Self::Null => write!(f, stringify!(Null)),
525            Self::Hole => write!(f, stringify!(Hole)),
526            Self::Str => write!(f, stringify!(Str)),
527            Self::LitStr => write!(f, stringify!(LitStr)),
528            Self::Text => write!(f, stringify!(Text)),
529            Self::InlineCode1 => write!(f, stringify!(InlineCode1)),
530            Self::LitStr3Start => write!(f, stringify!(LitStr3Start)),
531            Self::LitStr2Start => write!(f, stringify!(LitStr2Start)),
532            Self::LitStr1Start => write!(f, stringify!(LitStr1Start)),
533            Self::DelimCodeStart3 => write!(f, stringify!(DelimCodeStart3)),
534            Self::DelimCodeStart2 => write!(f, stringify!(DelimCodeStart2)),
535            Self::DelimCodeStart1 => write!(f, stringify!(DelimCodeStart1)),
536            Self::CodeBlockStart3 => write!(f, stringify!(CodeBlockStart3)),
537            Self::CodeBlockStart4 => write!(f, stringify!(CodeBlockStart4)),
538            Self::CodeBlockStart5 => write!(f, stringify!(CodeBlockStart5)),
539            Self::CodeBlockStart6 => write!(f, stringify!(CodeBlockStart6)),
540            Self::CodeBlockEnd3 => write!(f, stringify!(CodeBlockEnd3)),
541            Self::Backtick2 => write!(f, stringify!(Backtick2)),
542            Self::CodeBlockEnd4 => write!(f, stringify!(CodeBlockEnd4)),
543            Self::Backtick3 => write!(f, stringify!(Backtick3)),
544            Self::CodeBlockEnd5 => write!(f, stringify!(CodeBlockEnd5)),
545            Self::Backtick4 => write!(f, stringify!(Backtick4)),
546            Self::CodeBlockEnd6 => write!(f, stringify!(CodeBlockEnd6)),
547            Self::Backtick5 => write!(f, stringify!(Backtick5)),
548            Self::NoBacktick => write!(f, stringify!(NoBacktick)),
549            Self::LitStr3End => write!(f, stringify!(LitStr3End)),
550            Self::LitStr2End => write!(f, stringify!(LitStr2End)),
551            Self::LitStr1End => write!(f, stringify!(LitStr1End)),
552            Self::SQuote => write!(f, stringify!(SQuote)),
553            Self::NoSQuote => write!(f, stringify!(NoSQuote)),
554            Self::DelimCodeEnd3 => write!(f, stringify!(DelimCodeEnd3)),
555            Self::DelimCodeEnd2 => write!(f, stringify!(DelimCodeEnd2)),
556            Self::DelimCodeEnd1 => write!(f, stringify!(DelimCodeEnd1)),
557            Self::BacktickDelim => write!(f, stringify!(BacktickDelim)),
558            Self::GrammarNewline => write!(f, stringify!(GrammarNewline)),
559            Self::Ws => write!(f, stringify!(Ws)),
560            Self::At => write!(f, stringify!(At)),
561            Self::Dollar => write!(f, stringify!(Dollar)),
562            Self::Dot => write!(f, stringify!(Dot)),
563            Self::LBrace => write!(f, stringify!(LBrace)),
564            Self::RBrace => write!(f, stringify!(RBrace)),
565            Self::LBracket => write!(f, stringify!(LBracket)),
566            Self::RBracket => write!(f, stringify!(RBracket)),
567            Self::Circumflex => write!(f, stringify!(Circumflex)),
568            Self::LParen => write!(f, stringify!(LParen)),
569            Self::RParen => write!(f, stringify!(RParen)),
570            Self::NewlineBind => write!(f, stringify!(NewlineBind)),
571            Self::Bind => write!(f, stringify!(Bind)),
572            Self::Comma => write!(f, stringify!(Comma)),
573            Self::Esc => write!(f, stringify!(Esc)),
574            Self::NewlineTextStart => write!(f, stringify!(NewlineTextStart)),
575            Self::TextStart => write!(f, stringify!(TextStart)),
576            Self::Ident => write!(f, stringify!(Ident)),
577        }
578    }
579}
580
581impl std::fmt::Display for NonTerminalKind {
582    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
583        match self {
584            Self::Array => write!(f, stringify!(Array)),
585            Self::ArrayBegin => write!(f, stringify!(ArrayBegin)),
586            Self::ArrayElements => write!(f, stringify!(ArrayElements)),
587            Self::ArrayElementsOpt => write!(f, stringify!(ArrayElementsOpt)),
588            Self::ArrayElementsTail => write!(f, stringify!(ArrayElementsTail)),
589            Self::ArrayElementsTailOpt => write!(f, stringify!(ArrayElementsTailOpt)),
590            Self::ArrayEnd => write!(f, stringify!(ArrayEnd)),
591            Self::ArrayMarker => write!(f, stringify!(ArrayMarker)),
592            Self::ArrayMarkerOpt => write!(f, stringify!(ArrayMarkerOpt)),
593            Self::ArrayMarkerOptGroup => write!(f, stringify!(ArrayMarkerOptGroup)),
594            Self::ArrayOpt => write!(f, stringify!(ArrayOpt)),
595            Self::At => write!(f, stringify!(At)),
596            Self::Backtick2 => write!(f, stringify!(Backtick2)),
597            Self::Backtick3 => write!(f, stringify!(Backtick3)),
598            Self::Backtick4 => write!(f, stringify!(Backtick4)),
599            Self::Backtick5 => write!(f, stringify!(Backtick5)),
600            Self::BacktickDelim => write!(f, stringify!(BacktickDelim)),
601            Self::Begin => write!(f, stringify!(Begin)),
602            Self::Bind => write!(f, stringify!(Bind)),
603            Self::Binding => write!(f, stringify!(Binding)),
604            Self::BindingRhs => write!(f, stringify!(BindingRhs)),
605            Self::BlockBody => write!(f, stringify!(BlockBody)),
606            Self::Boolean => write!(f, stringify!(Boolean)),
607            Self::Caret => write!(f, stringify!(Caret)),
608            Self::CodeBlock => write!(f, stringify!(CodeBlock)),
609            Self::CodeBlock3 => write!(f, stringify!(CodeBlock3)),
610            Self::CodeBlock3List => write!(f, stringify!(CodeBlock3List)),
611            Self::CodeBlock3ListGroup => write!(f, stringify!(CodeBlock3ListGroup)),
612            Self::CodeBlock4 => write!(f, stringify!(CodeBlock4)),
613            Self::CodeBlock4List => write!(f, stringify!(CodeBlock4List)),
614            Self::CodeBlock4ListGroup => write!(f, stringify!(CodeBlock4ListGroup)),
615            Self::CodeBlock5 => write!(f, stringify!(CodeBlock5)),
616            Self::CodeBlock5List => write!(f, stringify!(CodeBlock5List)),
617            Self::CodeBlock5ListGroup => write!(f, stringify!(CodeBlock5ListGroup)),
618            Self::CodeBlock6 => write!(f, stringify!(CodeBlock6)),
619            Self::CodeBlock6List => write!(f, stringify!(CodeBlock6List)),
620            Self::CodeBlock6ListGroup => write!(f, stringify!(CodeBlock6ListGroup)),
621            Self::CodeBlockEnd3 => write!(f, stringify!(CodeBlockEnd3)),
622            Self::CodeBlockEnd4 => write!(f, stringify!(CodeBlockEnd4)),
623            Self::CodeBlockEnd5 => write!(f, stringify!(CodeBlockEnd5)),
624            Self::CodeBlockEnd6 => write!(f, stringify!(CodeBlockEnd6)),
625            Self::CodeBlockStart3 => write!(f, stringify!(CodeBlockStart3)),
626            Self::CodeBlockStart4 => write!(f, stringify!(CodeBlockStart4)),
627            Self::CodeBlockStart5 => write!(f, stringify!(CodeBlockStart5)),
628            Self::CodeBlockStart6 => write!(f, stringify!(CodeBlockStart6)),
629            Self::Comma => write!(f, stringify!(Comma)),
630            Self::Continue => write!(f, stringify!(Continue)),
631            Self::DelimCode => write!(f, stringify!(DelimCode)),
632            Self::DelimCode1 => write!(f, stringify!(DelimCode1)),
633            Self::DelimCode1List => write!(f, stringify!(DelimCode1List)),
634            Self::DelimCode1ListGroup => write!(f, stringify!(DelimCode1ListGroup)),
635            Self::DelimCode2 => write!(f, stringify!(DelimCode2)),
636            Self::DelimCode2List => write!(f, stringify!(DelimCode2List)),
637            Self::DelimCode2ListGroup => write!(f, stringify!(DelimCode2ListGroup)),
638            Self::DelimCode3 => write!(f, stringify!(DelimCode3)),
639            Self::DelimCode3List => write!(f, stringify!(DelimCode3List)),
640            Self::DelimCode3ListGroup => write!(f, stringify!(DelimCode3ListGroup)),
641            Self::DelimCodeEnd1 => write!(f, stringify!(DelimCodeEnd1)),
642            Self::DelimCodeEnd2 => write!(f, stringify!(DelimCodeEnd2)),
643            Self::DelimCodeEnd3 => write!(f, stringify!(DelimCodeEnd3)),
644            Self::DelimCodeStart1 => write!(f, stringify!(DelimCodeStart1)),
645            Self::DelimCodeStart2 => write!(f, stringify!(DelimCodeStart2)),
646            Self::DelimCodeStart3 => write!(f, stringify!(DelimCodeStart3)),
647            Self::Dot => write!(f, stringify!(Dot)),
648            Self::DotKey => write!(f, stringify!(DotKey)),
649            Self::End => write!(f, stringify!(End)),
650            Self::Eure => write!(f, stringify!(Eure)),
651            Self::EureList => write!(f, stringify!(EureList)),
652            Self::EureList0 => write!(f, stringify!(EureList0)),
653            Self::EureOpt => write!(f, stringify!(EureOpt)),
654            Self::Ext => write!(f, stringify!(Ext)),
655            Self::ExtensionNameSpace => write!(f, stringify!(ExtensionNameSpace)),
656            Self::False => write!(f, stringify!(False)),
657            Self::FirstKey => write!(f, stringify!(FirstKey)),
658            Self::FlatBody => write!(f, stringify!(FlatBody)),
659            Self::FlatBodyList => write!(f, stringify!(FlatBodyList)),
660            Self::FlatRootBinding => write!(f, stringify!(FlatRootBinding)),
661            Self::Float => write!(f, stringify!(Float)),
662            Self::GrammarNewline => write!(f, stringify!(GrammarNewline)),
663            Self::Hole => write!(f, stringify!(Hole)),
664            Self::Ident => write!(f, stringify!(Ident)),
665            Self::Inf => write!(f, stringify!(Inf)),
666            Self::InlineCode => write!(f, stringify!(InlineCode)),
667            Self::InlineCode1 => write!(f, stringify!(InlineCode1)),
668            Self::Integer => write!(f, stringify!(Integer)),
669            Self::Key => write!(f, stringify!(Key)),
670            Self::KeyIdent => write!(f, stringify!(KeyIdent)),
671            Self::KeyTail => write!(f, stringify!(KeyTail)),
672            Self::KeyTuple => write!(f, stringify!(KeyTuple)),
673            Self::KeyTupleElements => write!(f, stringify!(KeyTupleElements)),
674            Self::KeyTupleElementsOpt => write!(f, stringify!(KeyTupleElementsOpt)),
675            Self::KeyTupleElementsTail => write!(f, stringify!(KeyTupleElementsTail)),
676            Self::KeyTupleElementsTailOpt => write!(f, stringify!(KeyTupleElementsTailOpt)),
677            Self::KeyTupleOpt => write!(f, stringify!(KeyTupleOpt)),
678            Self::KeyValue => write!(f, stringify!(KeyValue)),
679            Self::Keys => write!(f, stringify!(Keys)),
680            Self::KeysList => write!(f, stringify!(KeysList)),
681            Self::LParen => write!(f, stringify!(LParen)),
682            Self::LitStr => write!(f, stringify!(LitStr)),
683            Self::LitStr1 => write!(f, stringify!(LitStr1)),
684            Self::LitStr1End => write!(f, stringify!(LitStr1End)),
685            Self::LitStr1List => write!(f, stringify!(LitStr1List)),
686            Self::LitStr1ListGroup => write!(f, stringify!(LitStr1ListGroup)),
687            Self::LitStr1Start => write!(f, stringify!(LitStr1Start)),
688            Self::LitStr2 => write!(f, stringify!(LitStr2)),
689            Self::LitStr2End => write!(f, stringify!(LitStr2End)),
690            Self::LitStr2List => write!(f, stringify!(LitStr2List)),
691            Self::LitStr2ListGroup => write!(f, stringify!(LitStr2ListGroup)),
692            Self::LitStr2Start => write!(f, stringify!(LitStr2Start)),
693            Self::LitStr3 => write!(f, stringify!(LitStr3)),
694            Self::LitStr3End => write!(f, stringify!(LitStr3End)),
695            Self::LitStr3List => write!(f, stringify!(LitStr3List)),
696            Self::LitStr3ListGroup => write!(f, stringify!(LitStr3ListGroup)),
697            Self::LitStr3Start => write!(f, stringify!(LitStr3Start)),
698            Self::MapBind => write!(f, stringify!(MapBind)),
699            Self::NaN => write!(f, stringify!(NaN)),
700            Self::NewlineBind => write!(f, stringify!(NewlineBind)),
701            Self::NewlineHead => write!(f, stringify!(NewlineHead)),
702            Self::NewlineHeadOpt => write!(f, stringify!(NewlineHeadOpt)),
703            Self::NewlineTextStart => write!(f, stringify!(NewlineTextStart)),
704            Self::NoBacktick => write!(f, stringify!(NoBacktick)),
705            Self::NoSQuote => write!(f, stringify!(NoSQuote)),
706            Self::Null => write!(f, stringify!(Null)),
707            Self::Number => write!(f, stringify!(Number)),
708            Self::Object => write!(f, stringify!(Object)),
709            Self::ObjectList => write!(f, stringify!(ObjectList)),
710            Self::ObjectOpt => write!(f, stringify!(ObjectOpt)),
711            Self::ObjectOpt0 => write!(f, stringify!(ObjectOpt0)),
712            Self::ObjectOpt1 => write!(f, stringify!(ObjectOpt1)),
713            Self::RParen => write!(f, stringify!(RParen)),
714            Self::RootBinding => write!(f, stringify!(RootBinding)),
715            Self::RootTextBinding => write!(f, stringify!(RootTextBinding)),
716            Self::RootTextBindingOpt => write!(f, stringify!(RootTextBindingOpt)),
717            Self::RootTextBindingOpt0 => write!(f, stringify!(RootTextBindingOpt0)),
718            Self::RootTextBindingOpt1 => write!(f, stringify!(RootTextBindingOpt1)),
719            Self::RootValueBinding => write!(f, stringify!(RootValueBinding)),
720            Self::SQuote => write!(f, stringify!(SQuote)),
721            Self::Section => write!(f, stringify!(Section)),
722            Self::SectionBinding => write!(f, stringify!(SectionBinding)),
723            Self::SectionBody => write!(f, stringify!(SectionBody)),
724            Self::SectionBodyOpt => write!(f, stringify!(SectionBodyOpt)),
725            Self::SectionHead => write!(f, stringify!(SectionHead)),
726            Self::Str => write!(f, stringify!(Str)),
727            Self::String => write!(f, stringify!(String)),
728            Self::Strings => write!(f, stringify!(Strings)),
729            Self::StringsList => write!(f, stringify!(StringsList)),
730            Self::Text => write!(f, stringify!(Text)),
731            Self::TextBinding => write!(f, stringify!(TextBinding)),
732            Self::TextBindingOpt => write!(f, stringify!(TextBindingOpt)),
733            Self::TextBindingOpt0 => write!(f, stringify!(TextBindingOpt0)),
734            Self::TextBindingOpt1 => write!(f, stringify!(TextBindingOpt1)),
735            Self::TextStart => write!(f, stringify!(TextStart)),
736            Self::TopLevelBinding => write!(f, stringify!(TopLevelBinding)),
737            Self::True => write!(f, stringify!(True)),
738            Self::Tuple => write!(f, stringify!(Tuple)),
739            Self::TupleElements => write!(f, stringify!(TupleElements)),
740            Self::TupleElementsOpt => write!(f, stringify!(TupleElementsOpt)),
741            Self::TupleElementsTail => write!(f, stringify!(TupleElementsTail)),
742            Self::TupleElementsTailOpt => write!(f, stringify!(TupleElementsTailOpt)),
743            Self::TupleIndex => write!(f, stringify!(TupleIndex)),
744            Self::TupleOpt => write!(f, stringify!(TupleOpt)),
745            Self::Value => write!(f, stringify!(Value)),
746            Self::ValueBinding => write!(f, stringify!(ValueBinding)),
747            Self::Ws => write!(f, stringify!(Ws)),
748            Self::Root => write!(f, stringify!(Root)),
749        }
750    }
751}
752
753#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
754pub enum NodeKind<T, Nt> {
755    Terminal(T),
756    NonTerminal(Nt),
757}