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

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

#[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskDeclaration {
    pub nodes: (Keyword, Option<Lifetime>, TaskBodyDeclaration),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum TaskBodyDeclaration {
    WithoutPort(Box<TaskBodyDeclarationWithoutPort>),
    WithPort(Box<TaskBodyDeclarationWithPort>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskBodyDeclarationWithoutPort {
    pub nodes: (
        Option<InterfaceIdentifierOrClassScope>,
        TaskIdentifier,
        Symbol,
        Vec<TfItemDeclaration>,
        Vec<StatementOrNull>,
        Keyword,
        Option<(Symbol, TaskIdentifier)>,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskBodyDeclarationWithPort {
    pub nodes: (
        Option<InterfaceIdentifierOrClassScope>,
        TaskIdentifier,
        Paren<Option<TfPortList>>,
        Symbol,
        Vec<BlockItemDeclaration>,
        Vec<StatementOrNull>,
        Keyword,
        Option<(Symbol, TaskIdentifier)>,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum TfItemDeclaration {
    BlockItemDeclaration(Box<BlockItemDeclaration>),
    TfPortDeclaration(Box<TfPortDeclaration>),
}

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

#[derive(Clone, Debug, PartialEq, Node)]
pub struct TfPortItem {
    pub nodes: (
        Vec<AttributeInstance>,
        Option<TfPortDirection>,
        Option<Var>,
        DataTypeOrImplicit,
        Option<(
            PortIdentifier,
            Vec<VariableDimension>,
            Option<(Symbol, Expression)>,
        )>,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub enum TfPortDirection {
    PortDirection(Box<PortDirection>),
    ConstRef(Box<(Keyword, Keyword)>),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct TfPortDeclaration {
    pub nodes: (
        Vec<AttributeInstance>,
        TfPortDirection,
        Option<Var>,
        DataTypeOrImplicit,
        ListOfTfVariableIdentifiers,
        Symbol,
    ),
}

#[derive(Clone, Debug, PartialEq, Node)]
pub struct TaskPrototype {
    pub nodes: (Keyword, TaskIdentifier, Option<Paren<Option<TfPortList>>>),
}