mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-25 01:55:33 +00:00
Add check of begin/end labels for genblock
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
This commit is contained in:
parent
baf1875307
commit
98c4feb72f
2 changed files with 28 additions and 0 deletions
|
@ -2794,6 +2794,8 @@ gen_block:
|
|||
ast_stack.push_back(node);
|
||||
} module_gen_body TOK_END opt_label {
|
||||
exitTypeScope();
|
||||
if ($3 != NULL && $7 != NULL && *$3 != *$7)
|
||||
frontend_verilog_yyerror("Begin label (%s) and end label (%s) don't match.", $3->c_str()+1, $7->c_str()+1);
|
||||
delete $3;
|
||||
delete $7;
|
||||
SET_AST_NODE_LOC(ast_stack.back(), @1, @7);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue