Fix emit of struct ports/declarations.
This commit is contained in:
parent
c7366e65cd
commit
7e202bb5ca
13
parse.y
13
parse.y
|
|
@ -3896,10 +3896,15 @@ module_attribute_foreign
|
|||
;
|
||||
|
||||
module_port_list_opt
|
||||
: '(' list_of_ports ')' { $$ = $2; }
|
||||
| '(' list_of_port_declarations ')' { $$ = $2; }
|
||||
| { $$ = 0; }
|
||||
;
|
||||
: '(' list_of_ports ')' { $$ = $2; }
|
||||
| '(' list_of_port_declarations ')' { $$ = $2; }
|
||||
| { $$ = 0; }
|
||||
| '(' error ')'
|
||||
{ yyerror(@2, "Errors in port declarations.");
|
||||
yyerrok;
|
||||
$$ = 0;
|
||||
}
|
||||
;
|
||||
|
||||
/* Module declarations include optional ANSI style module parameter
|
||||
ports. These are simply advance ways to declare parameters, so
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ int Entity::emit(ostream&out)
|
|||
|
||||
VType::decl_t&decl = declarations_[port->name];
|
||||
|
||||
if (sep) out << sep;
|
||||
if (sep) out << sep << endl;
|
||||
else sep = ", ";
|
||||
|
||||
switch (port->mode) {
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ int VTypeRecord::emit_def(ostream&out, perm_string name) const
|
|||
out << "; ";
|
||||
}
|
||||
|
||||
out << "} ";
|
||||
out << "} \\" << name << " ";
|
||||
return errors;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue