Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    r3e5dd913 r361bf01  
    155155        }
    156156
    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 
    166157        void print( const std::vector<ptr<Attribute>> & attrs ) {
    167158                if ( attrs.empty() ) return;
     
    215206        void preprint( const ast::NamedTypeDecl * node ) {
    216207                if ( ! node->name.empty() ) {
    217                         os << node->name << ": ";
     208                        if( deterministic_output && isUnboundType(node->name) ) os << "[unbound]:";
     209                        else os << node->name << ": ";
    218210                }
    219211
     
    269261        void preprint( const ast::FunctionType * node ) {
    270262                print( node->forall );
    271                 print( node->assertions );
    272263                print( node->qualifiers );
    273264        }
     
    13841375        virtual const ast::Type * visit( const ast::TypeInstType * node ) override final {
    13851376                preprint( node );
    1386                 const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node->typeString();
     1377                const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node->name;
    13871378                os << "instance of type " << _name
    13881379                   << " (" << (node->kind == ast::TypeDecl::Ftype ? "" : "not ") << "function type)";
     
    15111502                os << indent << "Types:" << endl;
    15121503                for ( const auto& i : *node ) {
    1513                         os << indent+1 << i.first.typeString() << " -> ";
     1504                        os << indent+1 << i.first << " -> ";
    15141505                        indent += 2;
    15151506                        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 );
    15161515                        indent -= 2;
    15171516                        os << endl;
Note: See TracChangeset for help on using the changeset viewer.