Fix constant_primary
This commit is contained in:
parent
936d6f6ada
commit
3125a2f0d4
@ -13,9 +13,13 @@ pub(crate) fn constant_primary(s: Span) -> IResult<Span, ConstantPrimary> {
|
|||||||
map(primary_literal, |x| {
|
map(primary_literal, |x| {
|
||||||
ConstantPrimary::PrimaryLiteral(Box::new(x))
|
ConstantPrimary::PrimaryLiteral(Box::new(x))
|
||||||
}),
|
}),
|
||||||
map(constant_function_call, |x| {
|
map(constant_cast, |x| {
|
||||||
ConstantPrimary::ConstantFunctionCall(Box::new(x))
|
ConstantPrimary::ConstantCast(Box::new(x))
|
||||||
}),
|
}),
|
||||||
|
map(
|
||||||
|
terminated(constant_function_call, peek(not(one_of("[")))),
|
||||||
|
|x| ConstantPrimary::ConstantFunctionCall(Box::new(x)),
|
||||||
|
),
|
||||||
constant_primary_ps_parameter,
|
constant_primary_ps_parameter,
|
||||||
constant_primary_specparam,
|
constant_primary_specparam,
|
||||||
map(genvar_identifier, |x| {
|
map(genvar_identifier, |x| {
|
||||||
@ -29,9 +33,6 @@ pub(crate) fn constant_primary(s: Span) -> IResult<Span, ConstantPrimary> {
|
|||||||
ConstantPrimary::ConstantLetExpression(Box::new(x))
|
ConstantPrimary::ConstantLetExpression(Box::new(x))
|
||||||
}),
|
}),
|
||||||
constant_primary_mintypmax_expression,
|
constant_primary_mintypmax_expression,
|
||||||
map(constant_cast, |x| {
|
|
||||||
ConstantPrimary::ConstantCast(Box::new(x))
|
|
||||||
}),
|
|
||||||
map(type_reference, |x| {
|
map(type_reference, |x| {
|
||||||
ConstantPrimary::TypeReference(Box::new(x))
|
ConstantPrimary::TypeReference(Box::new(x))
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user