Changeset e99e43f for src/SynTree


Ignore:
Timestamp:
Jan 10, 2019, 3:50:34 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
d97c3a4
Parents:
aeb8f70 (diff), 08222c7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Aaron Moss <a3moss@…> (01/10/19 14:46:09)
git-committer:
Aaron Moss <a3moss@…> (01/10/19 15:50:34)
Message:

Merge remote-tracking branch 'plg/master' into deferred_resn

Location:
src/SynTree
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    raeb8f70 re99e43f  
    376376        os << "Untyped Member Expression, with field: " << std::endl << indent+1;
    377377        member->print(os, indent+1 );
    378         os << indent << "... from aggregate: " << std::endl << indent+1;
     378        os << indent << "... from aggregate:" << std::endl << indent+1;
    379379        aggregate->print(os, indent+1);
    380380        Expression::print( os, indent );
     
    405405
    406406void MemberExpr::print( std::ostream &os, Indenter indent ) const {
    407         os << "Member Expression, with field: " << std::endl;
     407        os << "Member Expression, with field:" << std::endl;
    408408        os << indent+1;
    409409        member->print( os, indent+1 );
    410         os << std::endl << indent << "... from aggregate: " << std::endl << indent+1;
     410        os << std::endl << indent << "... from aggregate:" << std::endl << indent+1;
    411411        aggregate->print(os, indent + 1);
    412412        Expression::print( os, indent );
  • src/SynTree/FunctionDecl.cc

    raeb8f70 re99e43f  
    8787
    8888        if ( statements ) {
    89                 os << indent << "... with body " << endl << indent+1;
     89                os << indent << "... with body" << endl << indent+1;
    9090                statements->print( os, indent+1 );
    9191        } // if
  • src/SynTree/FunctionType.cc

    raeb8f70 re99e43f  
    6666                os << indent+1 << "accepting unspecified arguments" << endl;
    6767        } // if
    68         os << indent << "... returning ";
     68        os << indent << "... returning";
    6969        if ( returnVals.empty() ) {
    70                 os << "nothing " << endl;
     70                os << " nothing" << endl;
    7171        } else {
    7272                os << endl;
  • src/SynTree/ObjectDecl.cc

    raeb8f70 re99e43f  
    6666
    6767        if ( ! attributes.empty() ) {
    68                 os << std::endl << indent << "... with attributes: " << std::endl;
     68                os << std::endl << indent << "... with attributes:" << std::endl;
    6969                printAll( attributes, os, indent+1 );
    7070        }
  • src/SynTree/ReferenceToType.cc

    raeb8f70 re99e43f  
    9393        else {
    9494                Type::print( os, indent );
    95                 os << "instance of " << typeString() << " " << name << " with body " << baseStruct->has_body() << " ";
     95                os << "instance of " << typeString() << " " << name << " with body " << baseStruct->has_body();
    9696                if ( ! parameters.empty() ) {
    9797                        os << endl << indent << "... with parameters" << endl;
     
    136136        else {
    137137                Type::print( os, indent );
    138                 os << "instance of " << typeString() << " " << name << " with body " << baseUnion->has_body() << " ";
     138                os << "instance of " << typeString() << " " << name << " with body " << baseUnion->has_body();
    139139                if ( ! parameters.empty() ) {
    140140                        os << endl << indent << "... with parameters" << endl;
     
    160160        else {
    161161                Type::print( os, indent );
    162                 os << "instance of " << typeString() << " " << name << " with body " << baseEnum->has_body() << " ";
     162                os << "instance of " << typeString() << " " << name << " with body " << baseEnum->has_body();
    163163        } // if
    164164}
  • src/SynTree/Type.h

    raeb8f70 re99e43f  
    598598class TypeofType : public Type {
    599599  public:
    600         Expression *expr;
    601 
    602         TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     600        Expression *expr;    ///< expression to take the type of
     601        bool is_basetypeof;  ///< true iff is basetypeof type
     602
     603        TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     604        TypeofType( const Type::Qualifiers & tq, Expression *expr, bool is_basetypeof,
     605                const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    603606        TypeofType( const TypeofType& );
    604607        virtual ~TypeofType();
  • src/SynTree/TypeofType.cc

    raeb8f70 re99e43f  
    2323class Attribute;
    2424
    25 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), expr( expr ) {
    26 }
     25TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr,
     26        const std::list< Attribute * > & attributes )
     27: Type( tq, attributes ), expr( expr ), is_basetypeof(false) {}
    2728
    28 TypeofType::TypeofType( const TypeofType &other ) : Type( other ), expr( maybeClone( other.expr ) ) {
    29 }
     29TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof,
     30        const std::list< Attribute * > & attributes )
     31: Type( tq, attributes ), expr( expr ), is_basetypeof( is_basetypeof ) {}
     32
     33TypeofType::TypeofType( const TypeofType &other )
     34: Type( other ), expr( maybeClone( other.expr ) ), is_basetypeof( other.is_basetypeof ) {}
    3035
    3136TypeofType::~TypeofType() {
     
    3540void TypeofType::print( std::ostream &os, Indenter indent ) const {
    3641        Type::print( os, indent );
     42        if ( is_basetypeof ) { os << "base-"; }
    3743        os << "type-of expression ";
    3844        if ( expr ) {
Note: See TracChangeset for help on using the changeset viewer.