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
use crate::*;

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

#[derive(Clone, Debug, PartialEq, Node)]
pub struct InoutDeclaration {
    pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum InputDeclaration {
    Net(Box<InputDeclarationNet>),
    Variable(Box<InputDeclarationVariable>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct InputDeclarationNet {
    pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct InputDeclarationVariable {
    pub nodes: (Keyword, VariablePortType, ListOfVariableIdentifiers),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum OutputDeclaration {
    Net(Box<OutputDeclarationNet>),
    Variable(Box<OutputDeclarationVariable>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputDeclarationNet {
    pub nodes: (Keyword, NetPortType, ListOfPortIdentifiers),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct OutputDeclarationVariable {
    pub nodes: (Keyword, VariablePortType, ListOfVariablePortIdentifiers),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct InterfacePortDeclaration {
    pub nodes: (
        InterfaceIdentifier,
        Option<(Symbol, ModportIdentifier)>,
        ListOfInterfaceIdentifiers,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct RefDeclaration {
    pub nodes: (Keyword, VariablePortType, ListOfVariableIdentifiers),
}