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