1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
use crate::*;

// -----------------------------------------------------------------------------

#[derive(Clone, Debug, PartialEq, Node)]
pub enum Pattern {
    Variable(Box<PatternVariable>),
    Asterisk(Box<Symbol>),
    ConstantExpression(Box<ConstantExpression>),
    Tagged(Box<PatternTagged>),
    List(Box<PatternList>),
    IdentifierList(Box<PatternIdentifierList>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternVariable {
    pub nodes: (Symbol, VariableIdentifier),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternTagged {
    pub nodes: (Keyword, MemberIdentifier, Option<Pattern>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternList {
    pub nodes: (ApostropheBrace<List<Symbol, Pattern>>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct PatternIdentifierList {
    pub nodes: (ApostropheBrace<List<Symbol, (MemberIdentifier, Symbol, Pattern)>>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum AssignmentPattern {
    List(Box<AssignmentPatternList>),
    Structure(Box<AssignmentPatternStructure>),
    Array(Box<AssignmentPatternArray>),
    Repeat(Box<AssignmentPatternRepeat>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternList {
    pub nodes: (ApostropheBrace<List<Symbol, Expression>>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternStructure {
    pub nodes: (ApostropheBrace<List<Symbol, (StructurePatternKey, Symbol, Expression)>>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternArray {
    pub nodes: (ApostropheBrace<List<Symbol, (ArrayPatternKey, Symbol, Expression)>>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternRepeat {
    pub nodes: (ApostropheBrace<(ConstantExpression, Brace<List<Symbol, Expression>>)>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum StructurePatternKey {
    MemberIdentifier(Box<MemberIdentifier>),
    AssignmentPatternKey(Box<AssignmentPatternKey>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum ArrayPatternKey {
    ConstantExpression(Box<ConstantExpression>),
    AssignmentPatternKey(Box<AssignmentPatternKey>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum AssignmentPatternKey {
    SimpleType(Box<SimpleType>),
    Default(Box<Keyword>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternExpression {
    pub nodes: (Option<AssignmentPatternExpressionType>, AssignmentPattern),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum AssignmentPatternExpressionType {
    PsTypeIdentifier(Box<PsTypeIdentifier>),
    PsParameterIdentifier(Box<PsParameterIdentifier>),
    IntegerAtomType(Box<IntegerAtomType>),
    TypeReference(Box<TypeReference>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct ConstantAssignmentPatternExpression {
    pub nodes: (AssignmentPatternExpression,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternNetLvalue {
    pub nodes: (ApostropheBrace<List<Symbol, NetLvalue>>,),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct AssignmentPatternVariableLvalue {
    pub nodes: (ApostropheBrace<List<Symbol, VariableLvalue>>,),
}