Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ReferenceToType.cc

    r4040425 r5d125e4  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:28:51 2016
    13 // Update Count     : 5
     12// Last Modified On : Wed Jul 13 18:03:30 2016
     13// Update Count     : 9
    1414//
    1515
     
    6969}
    7070
     71void StructInstType::print( std::ostream &os, int indent ) const {
     72        using std::endl;
     73
     74        if ( baseStruct == NULL ) ReferenceToType::print( os, indent );
     75        else {
     76                Type::print( os, indent );
     77                os << "instance of " << typeString() << " " << name << " with body " << baseStruct->has_body() << " ";
     78                if ( ! parameters.empty() ) {
     79                        os << endl << std::string( indent, ' ' ) << "with parameters" << endl;
     80                        printAll( parameters, os, indent+2 );
     81                } // if
     82        } // if
     83}
     84
    7185std::string UnionInstType::typeString() const { return "union"; }
    7286
     
    7993        assert( baseUnion );
    8094        doLookup( baseUnion->get_members(), baseUnion->get_parameters(), parameters, name, foundDecls );
     95}
     96
     97void UnionInstType::print( std::ostream &os, int indent ) const {
     98        using std::endl;
     99
     100        if ( baseUnion == NULL ) ReferenceToType::print( os, indent );
     101        else {
     102                Type::print( os, indent );
     103                os << "instance of " << typeString() << " " << name << " with body " << baseUnion->has_body() << " ";
     104                if ( ! parameters.empty() ) {
     105                        os << endl << std::string( indent, ' ' ) << "with parameters" << endl;
     106                        printAll( parameters, os, indent+2 );
     107                } // if
     108        } // if
    81109}
    82110
Note: See TracChangeset for help on using the changeset viewer.