Support bit/logic return from functions.
Acked-by: Oswaldo Cadenas <oswaldo.cadenas@gmail.com> Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
This commit is contained in:
parent
ceaa45e9e5
commit
7b7abb1d55
10
parse.y
10
parse.y
|
|
@ -3531,6 +3531,16 @@ function_range_or_type_opt
|
|||
if ($3)
|
||||
$$.range = make_range_vector($3);
|
||||
}
|
||||
| bit_logic unsigned_signed_opt range_opt
|
||||
{
|
||||
/* the default type is bit/logic unsigned and no range */
|
||||
$$.type = PTF_REG;
|
||||
$$.range = 0;
|
||||
if ($2)
|
||||
$$.type = PTF_REG_S;
|
||||
if ($3)
|
||||
$$.range = make_range_vector($3);
|
||||
}
|
||||
| K_integer { $$.range = 0; $$.type = PTF_INTEGER; }
|
||||
| K_real { $$.range = 0; $$.type = PTF_REAL; }
|
||||
| K_realtime { $$.range = 0; $$.type = PTF_REALTIME; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue