diff --git a/sv-parser-parser/src/behavioral_statements/timing_control_statements.rs b/sv-parser-parser/src/behavioral_statements/timing_control_statements.rs index ce9bdcda..341f36e7 100644 --- a/sv-parser-parser/src/behavioral_statements/timing_control_statements.rs +++ b/sv-parser-parser/src/behavioral_statements/timing_control_statements.rs @@ -99,10 +99,11 @@ pub(crate) fn event_control_event_expression(s: Span) -> IResult IResult { - let (s, a) = symbol("@*")(s)?; + let (s, a) = symbol("@")(s)?; + let (s, b) = symbol("*")(s)?; Ok(( s, - EventControl::Asterisk(Box::new(EventControlAsterisk { nodes: (a,) })), + EventControl::Asterisk(Box::new(EventControlAsterisk { nodes: (a, b) })), )) } diff --git a/sv-parser-parser/src/tests.rs b/sv-parser-parser/src/tests.rs index 2a3d8b85..7c2253e7 100644 --- a/sv-parser-parser/src/tests.rs +++ b/sv-parser-parser/src/tests.rs @@ -316,6 +316,13 @@ mod unit { test!(comment, "/*! comment\n * aaa\n */", Ok((_, _))); } + #[test] + fn test_event_control_asterisk() { + test!(event_control_asterisk, "@*", Ok((_, _))); + test!(event_control_asterisk, "@ *", Ok((_, _))); + test!(event_control_asterisk, "@ *", Ok((_, _))); + } + #[test] fn test_expression() { test!(expression, "(!a ? 0 : !b : 1 : c ? 0 : 1)", Ok((_, _))); diff --git a/sv-parser-syntaxtree/src/behavioral_statements/timing_control_statements.rs b/sv-parser-syntaxtree/src/behavioral_statements/timing_control_statements.rs index 8bbba9e4..80141f1a 100644 --- a/sv-parser-syntaxtree/src/behavioral_statements/timing_control_statements.rs +++ b/sv-parser-syntaxtree/src/behavioral_statements/timing_control_statements.rs @@ -56,7 +56,7 @@ pub struct EventControlEventExpression { #[derive(Clone, Debug, PartialEq, Node)] pub struct EventControlAsterisk { - pub nodes: (Symbol,), + pub nodes: (Symbol, Symbol), } #[derive(Clone, Debug, PartialEq, Node)]