diff --git a/sv-parser-parser/src/general/comments.rs b/sv-parser-parser/src/general/comments.rs index 189252d..c74eda9 100644 --- a/sv-parser-parser/src/general/comments.rs +++ b/sv-parser-parser/src/general/comments.rs @@ -30,7 +30,10 @@ pub(crate) fn one_line_comment(s: Span) -> IResult { #[packrat_parser] pub(crate) fn block_comment(s: Span) -> IResult { let (s, a) = tag("/*")(s)?; - let (s, b) = many0(alt((is_not("*"), terminated(tag("*"), is_not("/")))))(s)?; + let (s, b) = many0(alt(( + is_not("*"), + terminated(tag("*"), peek(not(tag("/")))), + )))(s)?; let (s, c) = tag("*/")(s)?; let mut a = a; for b in b {