sv_parser_syntaxtree/behavioral_statements/
conditional_statements.rs

1use crate::*;
2
3// -----------------------------------------------------------------------------
4
5#[derive(Clone, Debug, PartialEq, Node)]
6pub struct ConditionalStatement {
7    pub nodes: (
8        Option<UniquePriority>,
9        Keyword,
10        Paren<CondPredicate>,
11        StatementOrNull,
12        Vec<(Keyword, Keyword, Paren<CondPredicate>, StatementOrNull)>,
13        Option<(Keyword, StatementOrNull)>,
14    ),
15}
16
17#[derive(Clone, Debug, PartialEq, Node)]
18pub enum UniquePriority {
19    Unique(Box<Keyword>),
20    Unique0(Box<Keyword>),
21    Priority(Box<Keyword>),
22}
23
24#[derive(Clone, Debug, PartialEq, Node)]
25pub struct CondPredicate {
26    pub nodes: (List<Symbol, ExpressionOrCondPattern>,),
27}
28
29#[derive(Clone, Debug, PartialEq, Node)]
30pub enum ExpressionOrCondPattern {
31    Expression(Box<Expression>),
32    CondPattern(Box<CondPattern>),
33}
34
35#[derive(Clone, Debug, PartialEq, Node)]
36pub struct CondPattern {
37    pub nodes: (Expression, Keyword, Pattern),
38}