Merge pull request #2189 from antmicro/optional-labels

Add support for optional labels
This commit is contained in:
whitequark 2020-06-26 07:29:24 +00:00 committed by GitHub
commit d6bdc09422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -435,7 +435,7 @@ module:
mod->str = *$4;
append_attr(mod, $1);
delete $4;
} module_para_opt module_args_opt ';' module_body TOK_ENDMODULE {
} module_para_opt module_args_opt ';' module_body TOK_ENDMODULE opt_label {
if (port_stubs.size() != 0)
frontend_verilog_yyerror("Missing details for module port `%s'.",
port_stubs.begin()->first.c_str());
@ -556,7 +556,7 @@ package:
current_ast_mod = mod;
mod->str = *$4;
append_attr(mod, $1);
} ';' package_body TOK_ENDPACKAGE {
} ';' package_body TOK_ENDPACKAGE opt_label {
ast_stack.pop_back();
current_ast_mod = NULL;
exitTypeScope();