Minor improvements to expression debug prints.

This commit is contained in:
Stephen Williams 2008-08-28 21:16:44 -07:00
parent e6c2637367
commit 5d5228b6b8
3 changed files with 13 additions and 4 deletions

View File

@ -1015,6 +1015,8 @@ void NetScope::dump(ostream&o) const
; pp != parameters.end() ; pp ++) {
o << " parameter ";
o << pp->second.type << " ";
if ((*pp).second.signed_flag)
o << "signed ";

View File

@ -283,6 +283,9 @@ void PEBinary::dump(ostream&out) const
case 'N':
out << "!==";
break;
case 'p':
out << "**";
break;
case 'R':
out << ">>>";
break;

View File

@ -691,11 +691,15 @@ ostream& operator<< (ostream&o, const verinum&v)
verinum::V trim_left = v.get(v.len()-1);
unsigned idx;
for (idx = v.len()-1; idx > 0; idx -= 1)
if (trim_left != v.get(idx-1))
break;
if (v.has_sign()) {
for (idx = v.len()-1; idx > 0; idx -= 1)
if (trim_left != v.get(idx-1))
break;
o << trim_left;
o << trim_left;
} else {
idx = v.len();
}
while (idx > 0) {
o << v.get(idx-1);