Fix constant_bit_select

This commit is contained in:
dalance 2019-12-02 11:48:44 +09:00
parent b5a4cad61a
commit 8110fcd572
3 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,7 @@
## [Unreleased](https://github.com/dalance/sv-parser/compare/v0.4.5...Unreleased) - ReleaseDate
* [Fix] constant_bit_select
* [Fix] wrong linebreak at define macro usage
## [v0.4.5](https://github.com/dalance/sv-parser/compare/v0.4.4...v0.4.5) - 2019-11-28

View File

@ -20,7 +20,7 @@ pub(crate) fn constant_primary(s: Span) -> IResult<Span, ConstantPrimary> {
}),
constant_primary_mintypmax_expression,
map(
terminated(constant_function_call, peek(not(one_of("[")))),
terminated(constant_function_call, peek(not(one_of("[.")))),
|x| ConstantPrimary::ConstantFunctionCall(Box::new(x)),
),
constant_primary_ps_parameter,

View File

@ -393,6 +393,11 @@ mod unit {
r##"module a; b #( .a(a+1)) a (); endmodule"##,
Ok((_, _))
);
test!(
source_text,
r##"module A; always begin a[ a_a[i] ].b <= c; end endmodule"##,
Ok((_, _))
);
}
}
@ -15853,7 +15858,7 @@ mod spec {
fn debug() {
test!(
source_text,
r##"module a; b #( .a(a+1)) a (); endmodule"##,
r##"module A; always begin a[ a_a[i] ].b <= c; end endmodule"##,
Ok((_, _))
);
nom_tracable::cumulative_histogram();