Changes in src/AST/Print.cpp [3e5dd913:cd6a6ff]
- File:
-
- 1 edited
-
src/AST/Print.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Print.cpp
r3e5dd913 rcd6a6ff 146 146 } 147 147 148 void print( const ast:: FunctionType::ForallList & forall ) {148 void print( const ast::ParameterizedType::ForallList & forall ) { 149 149 if ( forall.empty() ) return; 150 150 os << "forall" << endl; 151 151 ++indent; 152 152 printAll( forall ); 153 os << indent;154 --indent;155 }156 157 void print( const ast::FunctionType::AssertionList & assts ) {158 if (assts.empty()) return;159 os << "with assertions" << endl;160 ++indent;161 printAll(assts);162 153 os << indent; 163 154 --indent; … … 215 206 void preprint( const ast::NamedTypeDecl * node ) { 216 207 if ( ! node->name.empty() ) { 217 os << node->name << ": "; 208 if( deterministic_output && isUnboundType(node->name) ) os << "[unbound]:"; 209 else os << node->name << ": "; 218 210 } 219 211 … … 232 224 } 233 225 226 if ( ! node->params.empty() ) { 227 os << endl << indent << "... with parameters" << endl; 228 ++indent; 229 printAll( node->params ); 230 --indent; 231 } 232 234 233 if ( ! node->assertions.empty() ) { 235 234 os << endl << indent << "... with assertions" << endl; … … 267 266 } 268 267 269 void preprint( const ast:: FunctionType * node ) {268 void preprint( const ast::ParameterizedType * node ) { 270 269 print( node->forall ); 271 print( node->assertions );272 270 print( node->qualifiers ); 273 271 } 274 272 275 273 void preprint( const ast::BaseInstType * node ) { 274 print( node->forall ); 276 275 print( node->attributes ); 277 276 print( node->qualifiers ); … … 1384 1383 virtual const ast::Type * visit( const ast::TypeInstType * node ) override final { 1385 1384 preprint( node ); 1386 const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node-> typeString();1385 const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node->name; 1387 1386 os << "instance of type " << _name 1388 1387 << " (" << (node->kind == ast::TypeDecl::Ftype ? "" : "not ") << "function type)"; … … 1511 1510 os << indent << "Types:" << endl; 1512 1511 for ( const auto& i : *node ) { 1513 os << indent+1 << i.first .typeString()<< " -> ";1512 os << indent+1 << i.first << " -> "; 1514 1513 indent += 2; 1515 1514 safe_print( i.second ); 1515 indent -= 2; 1516 os << endl; 1517 } 1518 os << indent << "Non-types:" << endl; 1519 for ( auto i = node->beginVar(); i != node->endVar(); ++i ) { 1520 os << indent+1 << i->first << " -> "; 1521 indent += 2; 1522 safe_print( i->second ); 1516 1523 indent -= 2; 1517 1524 os << endl;
Note:
See TracChangeset
for help on using the changeset viewer.