ivl: Parsing rules for type casting.
This commit is contained in:
parent
13f861a963
commit
daa59a95ad
12
parse.y
12
parse.y
|
|
@ -3543,6 +3543,18 @@ expr_primary
|
|||
}
|
||||
}
|
||||
|
||||
| data_type '\'' '(' expression ')'
|
||||
{ PExpr*base = $4;
|
||||
if (gn_system_verilog()) {
|
||||
PECastType*tmp = new PECastType($1, base);
|
||||
FILE_NAME(tmp, @1);
|
||||
$$ = tmp;
|
||||
} else {
|
||||
yyerror(@1, "error: Type cast requires SystemVerilog.");
|
||||
$$ = base;
|
||||
}
|
||||
}
|
||||
|
||||
/* Aggregate literals are primaries. */
|
||||
|
||||
| assignment_pattern
|
||||
|
|
|
|||
Loading…
Reference in New Issue