Changes in src/AST/Print.cpp [3e5dd913:361bf01]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Print.cpp
r3e5dd913 r361bf01 155 155 } 156 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 os << indent;163 --indent;164 }165 166 157 void print( const std::vector<ptr<Attribute>> & attrs ) { 167 158 if ( attrs.empty() ) return; … … 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 … … 269 261 void preprint( const ast::FunctionType * node ) { 270 262 print( node->forall ); 271 print( node->assertions );272 263 print( node->qualifiers ); 273 264 } … … 1384 1375 virtual const ast::Type * visit( const ast::TypeInstType * node ) override final { 1385 1376 preprint( node ); 1386 const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node-> typeString();1377 const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node->name; 1387 1378 os << "instance of type " << _name 1388 1379 << " (" << (node->kind == ast::TypeDecl::Ftype ? "" : "not ") << "function type)"; … … 1511 1502 os << indent << "Types:" << endl; 1512 1503 for ( const auto& i : *node ) { 1513 os << indent+1 << i.first .typeString()<< " -> ";1504 os << indent+1 << i.first << " -> "; 1514 1505 indent += 2; 1515 1506 safe_print( i.second ); 1507 indent -= 2; 1508 os << endl; 1509 } 1510 os << indent << "Non-types:" << endl; 1511 for ( auto i = node->beginVar(); i != node->endVar(); ++i ) { 1512 os << indent+1 << i->first << " -> "; 1513 indent += 2; 1514 safe_print( i->second ); 1516 1515 indent -= 2; 1517 1516 os << endl;
Note: See TracChangeset
for help on using the changeset viewer.