3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-25 18:15:34 +00:00

verilog: allow null gen-if then block

This commit is contained in:
Zachary Snow 2020-05-04 20:22:16 -04:00
parent 584780d776
commit 8f9bba1bbf
3 changed files with 23 additions and 1 deletions

View file

@ -2533,7 +2533,12 @@ gen_stmt:
ast_stack.back()->children.push_back(node);
ast_stack.push_back(node);
ast_stack.back()->children.push_back($3);
} gen_stmt_block opt_gen_else {
AstNode *block = new AstNode(AST_GENBLOCK);
ast_stack.back()->children.push_back(block);
ast_stack.push_back(block);
} gen_stmt_or_null {
ast_stack.pop_back();
} opt_gen_else {
SET_AST_NODE_LOC(ast_stack.back(), @1, @7);
ast_stack.pop_back();
} |