Fix constant_mintypmax_expression priority
This commit is contained in:
parent
ba89870178
commit
c5c4640708
@ -16,6 +16,7 @@ pub(crate) fn constant_primary(s: Span) -> IResult<Span, ConstantPrimary> {
|
||||
map(primary_literal, |x| {
|
||||
ConstantPrimary::PrimaryLiteral(Box::new(x))
|
||||
}),
|
||||
constant_primary_mintypmax_expression,
|
||||
map(
|
||||
terminated(constant_function_call, peek(not(one_of("[")))),
|
||||
|x| ConstantPrimary::ConstantFunctionCall(Box::new(x)),
|
||||
@ -32,7 +33,6 @@ pub(crate) fn constant_primary(s: Span) -> IResult<Span, ConstantPrimary> {
|
||||
map(constant_let_expression, |x| {
|
||||
ConstantPrimary::ConstantLetExpression(Box::new(x))
|
||||
}),
|
||||
constant_primary_mintypmax_expression,
|
||||
map(type_reference, |x| {
|
||||
ConstantPrimary::TypeReference(Box::new(x))
|
||||
}),
|
||||
|
@ -339,6 +339,13 @@ mod unit {
|
||||
endmodule"##,
|
||||
Ok((_, _))
|
||||
);
|
||||
test!(
|
||||
source_text,
|
||||
r##"module ibex_cs_registers;
|
||||
localparam logic [31:0] MISA_VALUE = (32'(RV32E));
|
||||
endmodule"##,
|
||||
Ok((_, _))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15812,8 +15819,8 @@ mod spec {
|
||||
#[test]
|
||||
fn debug() {
|
||||
test!(
|
||||
many1(module_item),
|
||||
r##"sequence t2; (a ##[2:3] b) or (c ##[1:2] d); endsequence"##,
|
||||
source_text,
|
||||
r##"module ibex_cs_registers; localparam logic [31:0] MISA_VALUE = (32'(RV32E)); endmodule"##,
|
||||
Ok((_, _))
|
||||
);
|
||||
nom_tracable::cumulative_histogram();
|
||||
|
Loading…
x
Reference in New Issue
Block a user