Changeset a32b204 for translator/SynTree


Ignore:
Timestamp:
May 17, 2015, 1:19:35 PM (11 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
0dd3a2f
Parents:
b87a5ed
Message:

licencing: second groups of files

Location:
translator/SynTree
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • translator/SynTree/AddressExpr.cc

    rb87a5ed ra32b204  
    1414    : Expression( _aname ), arg( arg )
    1515{
    16     for( std::list< Type* >::const_iterator i = arg->get_results().begin(); i != arg->get_results().end(); ++i ) {
     16    for ( std::list< Type* >::const_iterator i = arg->get_results().begin(); i != arg->get_results().end(); ++i ) {
    1717        get_results().push_back( new PointerType( Type::Qualifiers(), (*i)->clone() ) );
    1818    }
     
    3333{
    3434    os << std::string( indent, ' ' ) << "Address of:" << std::endl;
    35     if( arg ) {
     35    if ( arg ) {
    3636        arg->print( os, indent+2 );
    3737    }
  • translator/SynTree/AggregateDecl.cc

    rb87a5ed ra32b204  
    3636
    3737    os << typeString() << " " << get_name();
    38     if( !parameters.empty() ) {
     38    if ( ! parameters.empty() ) {
    3939        os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
    4040        printAll( parameters, os, indent+4 );
    4141    }
    42     if( !members.empty() ) {
     42    if ( ! members.empty() ) {
    4343        os << endl << string( indent+2, ' ' ) << "with members" << endl;
    4444        printAll( members, os, indent+4 );
     
    5353
    5454    os << typeString() << " " << get_name();
    55     if( !parameters.empty() ) {
     55    if ( ! parameters.empty() ) {
    5656        os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
    5757        printAll( parameters, os, indent+4 );
  • translator/SynTree/ApplicationExpr.cc

    rb87a5ed ra32b204  
    1616ParamEntry::operator=( const ParamEntry &other )
    1717{
    18     if( &other == this ) return *this;
     18    if ( &other == this ) return *this;
    1919    decl = other.decl;
    2020    actualType = maybeClone( other.actualType );
     
    3939    assert( function );
    4040   
    41     for( std::list< DeclarationWithType* >::const_iterator i = function->get_returnVals().begin(); i != function->get_returnVals().end(); ++i ) {
     41    for ( std::list< DeclarationWithType* >::const_iterator i = function->get_returnVals().begin(); i != function->get_returnVals().end(); ++i ) {
    4242        get_results().push_back( (*i)->get_type()->clone() );
    4343    }
     
    6161    os << std::string( indent, ' ' ) << "Application of" << std::endl;
    6262    function->print( os, indent+2 );
    63     if( !args.empty() ) {
     63    if ( ! args.empty() ) {
    6464        os << std::string( indent, ' ' ) << "to arguments" << std::endl;
    6565        printAll( args, os, indent+2 );
    6666    }
    67     if( !inferParams.empty() ) {
     67    if ( ! inferParams.empty() ) {
    6868        os << std::string(indent, ' ') << "with inferred parameters:" << std::endl;
    69         for( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) {
     69        for ( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) {
    7070            os << std::string(indent+2, ' ');
    7171            Declaration::declFromId( i->second.decl )->printShort( os, indent+2 );
  • translator/SynTree/ArrayType.cc

    rb87a5ed ra32b204  
    3333{
    3434    Type::print( os, indent );
    35     if( isStatic ) {
     35    if ( isStatic ) {
    3636        os << "static ";
    3737    }
    38     if( isVarLen ) {
     38    if ( isVarLen ) {
    3939        os << "variable length array of ";
    40     } else if( dimension ) {
     40    } else if ( dimension ) {
    4141        os << "array of ";
    4242        dimension->print( os, indent );
     
    4444        os << "open array of ";
    4545    }
    46     if( base ) {
     46    if ( base ) {
    4747        base->print( os, indent );
    4848    }
  • translator/SynTree/AttrType.cc

    rb87a5ed ra32b204  
    3737    Type::print( os, indent );
    3838    os << "attribute " << name << " applied to ";
    39     if( expr ) {
     39    if ( expr ) {
    4040        os << "expression ";
    4141        expr->print( os, indent );
    4242    }
    43     if( type ) {
     43    if ( type ) {
    4444        os << "type ";
    4545        type->print( os, indent );
  • translator/SynTree/BasicType.cc

    rb87a5ed ra32b204  
    1919
    2020bool BasicType::isInteger() const {
    21     switch( kind ) {
     21    switch ( kind ) {
    2222      case Bool:
    2323      case Char:
  • translator/SynTree/CodeGenVisitor.cc

    rb87a5ed ra32b204  
    2020
    2121void CodeGenVisitor::visit(ConstantExpr *cnst){
    22     if(cnst != 0)
     22    if (cnst != 0)
    2323        visit(cnst->get_constant());
    2424}
     
    2828
    2929void CodeGenVisitor::visit(ExprStmt *exprStmt){
    30     if(exprStmt != 0)
     30    if (exprStmt != 0)
    3131        exprStmt->get_expr()->accept(*this);    // visit(exprStmt->get_expr()) doesn't work
    3232}
    3333
    3434void CodeGenVisitor::visit(SwitchStmt *switchStmt){
    35     cout << "switch(" << endl;     
     35    cout << "switch (" << endl;     
    3636    // visit(switchStmt->get_condition());   // why doesn't this work?
    3737    switchStmt->get_condition()->accept(*this);
  • translator/SynTree/Constant.cc

    rb87a5ed ra32b204  
    1515void Constant::print( std::ostream &os ) const {
    1616    os << value;
    17     if( type ) {
     17    if ( type ) {
    1818        os << " (type: ";
    1919        type->print( os );
  • translator/SynTree/DeclStmt.cc

    rb87a5ed ra32b204  
    3030{
    3131    os << "Declaration of ";
    32     if( decl ) {
     32    if ( decl ) {
    3333        decl->print( os, indent );
    3434    }
  • translator/SynTree/Declaration.cc

    rb87a5ed ra32b204  
    4747{
    4848    IdMapType::const_iterator i = idMap.find( id );
    49     if( i != idMap.end() ) {
     49    if ( i != idMap.end() ) {
    5050        return i->second;
    5151    } else {
     
    5858Declaration::dumpIds( std::ostream &os )
    5959{
    60     for( IdMapType::const_iterator i = idMap.begin(); i != idMap.end(); ++i ) {
     60    for ( IdMapType::const_iterator i = idMap.begin(); i != idMap.end(); ++i ) {
    6161        os << i->first << " -> ";
    6262        i->second->printShort( os );
  • translator/SynTree/Expression.cc

    rb87a5ed ra32b204  
    3232Expression::add_result( Type *t )
    3333{
    34     if( TupleType *tuple = dynamic_cast< TupleType* >( t ) ) {
     34    if ( TupleType *tuple = dynamic_cast< TupleType* >( t ) ) {
    3535        std::copy( tuple->get_types().begin(), tuple->get_types().end(), back_inserter( results ) );
    3636    } else {
     
    4040
    4141void Expression::print(std::ostream &os, int indent) const {
    42     if( env ) {
     42    if ( env ) {
    4343        os << std::string(indent, ' ') << "with environment:" << std::endl;
    4444        env->print( os, indent+2 );
    4545    }
    4646
    47     if( argName ) {
     47    if ( argName ) {
    4848        os << std::string(indent, ' ') << "with designator:";
    4949        argName->print( os, indent+2 );
     
    7575{
    7676    add_result( var->get_type()->clone() );
    77     for( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) {
     77    for ( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) {
    7878        (*i)->set_isLvalue( true );
    7979    }
     
    9494
    9595    Declaration *decl = get_var();
    96     // if( decl != 0) decl->print(os, indent + 2);
    97     if( decl != 0) decl->printShort(os, indent + 2);
     96    // if ( decl != 0) decl->print(os, indent + 2);
     97    if ( decl != 0) decl->printShort(os, indent + 2);
    9898    os << std::endl;
    9999    Expression::print( os, indent );
     
    126126    os << std::string(indent, ' ') << "Sizeof Expression on: ";
    127127
    128     if(isType)
     128    if (isType)
    129129        type->print(os, indent + 2);
    130130    else
     
    160160    os << std::string(indent, ' ') << "Attr ";
    161161    attr->print( os, indent + 2 );
    162     if( isType || expr ) {
     162    if ( isType || expr ) {
    163163        os << "applied to: ";
    164164
    165         if(isType)
     165        if (isType)
    166166            type->print(os, indent + 2);
    167167        else
     
    197197    arg->print(os, indent+2);
    198198    os << std::endl << std::string(indent, ' ') << "to:" << std::endl;
    199     if( results.empty() ) {
     199    if ( results.empty() ) {
    200200        os << std::string(indent+2, ' ') << "nothing" << std::endl;
    201201    } else {
     
    233233{
    234234    add_result( member->get_type()->clone() );
    235     for( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) {
     235    for ( std::list< Type* >::iterator i = get_results().begin(); i != get_results().end(); ++i ) {
    236236        (*i)->set_isLvalue( true );
    237237    }
     
    287287void UntypedExpr::printArgs(std::ostream &os, int indent ) const {
    288288    std::list<Expression *>::const_iterator i;
    289     for(i = args.begin(); i != args.end(); i++)
     289    for (i = args.begin(); i != args.end(); i++)
    290290        (*i)->print(os, indent);
    291291}
     
    362362{
    363363    os << std::string(indent, ' ') << "Valof Expression: " << std::endl;
    364     if( get_body() != 0 )
     364    if ( get_body() != 0 )
    365365        get_body()->print( os, indent + 2 );
    366366}
  • translator/SynTree/FunctionDecl.cc

    rb87a5ed ra32b204  
    5656    if ( ! oldIdents.empty() ) {
    5757        os << string( indent+2, ' ' ) << "with parameter names" << endl;
    58         for( std::list< std::string >::const_iterator i = oldIdents.begin(); i != oldIdents.end(); ++i ) {
     58        for ( std::list< std::string >::const_iterator i = oldIdents.begin(); i != oldIdents.end(); ++i ) {
    5959            os << string( indent+4, ' ' ) << *i << endl;
    6060        }
  • translator/SynTree/Initializer.cc

    rb87a5ed ra32b204  
    6161    }
    6262
    63     for( std::list<Initializer *>::iterator i = initializers.begin(); i != initializers.end(); i++ )
     63    for ( std::list<Initializer *>::iterator i = initializers.begin(); i != initializers.end(); i++ )
    6464        (*i)->print( os, indent + 2 );
    6565}
  • translator/SynTree/Mutator.h

    rb87a5ed ra32b204  
    110110        }
    111111    }
    112     if ( !errors.isEmpty() ) {
     112    if ( ! errors.isEmpty() ) {
    113113        throw errors;
    114114    }
  • translator/SynTree/NamedTypeDecl.cc

    rb87a5ed ra32b204  
    3535        base->print( os, indent );
    3636    } // if
    37     if ( !parameters.empty() ) {
     37    if ( ! parameters.empty() ) {
    3838        os << endl << string( indent, ' ' ) << "with parameters" << endl;
    3939        printAll( parameters, os, indent+2 );
    4040    } // if
    41     if ( !assertions.empty() ) {
     41    if ( ! assertions.empty() ) {
    4242        os << endl << string( indent, ' ' ) << "with assertions" << endl;
    4343        printAll( assertions, os, indent+2 );
     
    5959        base->print( os, indent );
    6060    } // if
    61     if ( !parameters.empty() ) {
     61    if ( ! parameters.empty() ) {
    6262        os << endl << string( indent, ' ' ) << "with parameters" << endl;
    6363        printAll( parameters, os, indent+2 );
  • translator/SynTree/PointerType.cc

    rb87a5ed ra32b204  
    4040    Type::print( os, indent );
    4141    os << "pointer to ";
    42     if( isStatic ) {
     42    if ( isStatic ) {
    4343        os << "static ";
    4444    }
    45     if( isVarLen ) {
     45    if ( isVarLen ) {
    4646        os << "variable length array of ";
    47     } else if( dimension ) {
     47    } else if ( dimension ) {
    4848        os << "array of ";
    4949        dimension->print( os, indent );
    5050    }
    51     if( base ) {
     51    if ( base ) {
    5252        base->print( os, indent );
    5353    }
  • translator/SynTree/ReferenceToType.cc

    rb87a5ed ra32b204  
    3939    Type::print( os, indent );
    4040    os << "instance of " << typeString() << " " << name << " ";
    41     if( !parameters.empty() ) {
     41    if ( ! parameters.empty() ) {
    4242        os << endl << std::string( indent, ' ' ) << "with parameters" << endl;
    4343        printAll( parameters, os, indent+2 );
     
    5151{
    5252    std::list< Declaration* > found;
    53     for( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
    54         if( (*i)->get_name() == name ) {
     53    for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
     54        if ( (*i)->get_name() == name ) {
    5555            found.push_back( *i );
    5656        }
     
    118118    Type::print( os, indent );
    119119    os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " a function type) ";
    120     if( !parameters.empty() ) {
     120    if ( ! parameters.empty() ) {
    121121        os << endl << std::string( indent, ' ' ) << "with parameters" << endl;
    122122        printAll( parameters, os, indent+2 );
  • translator/SynTree/Statement.cc

    rb87a5ed ra32b204  
    3838{
    3939    //actually this is a syntactic error signaled by the parser
    40     if(type == BranchStmt::Goto && target.size() == 0)
     40    if (type == BranchStmt::Goto && target.size() == 0)
    4141        throw SemanticError("goto without target");
    4242}
     
    4646    Statement(labels), computedTarget(_computedTarget), type(_type)
    4747{
    48     if(type != BranchStmt::Goto || computedTarget == 0)
     48    if (type != BranchStmt::Goto || computedTarget == 0)
    4949        throw SemanticError("Computed target not valid in branch statement");
    5050}
     
    6363void ReturnStmt::print( std::ostream &os, int indent ){
    6464    os << "\r" << std::string(indent, ' ') << string ( isThrow? "Throw":"Return" ) << " Statement, returning: ";
    65     if(expr != 0) expr->print(os);
     65    if (expr != 0) expr->print(os);
    6666    os << endl;
    6767}
     
    8181    thenPart->print(os, indent + 4);
    8282
    83     if(elsePart != 0){
     83    if (elsePart != 0){
    8484        elsePart->print(os, indent + 4);
    8585    }
     
    104104    // branches
    105105    std::list<Statement *>::iterator i;
    106     for(i = branches.begin(); i != branches.end(); i++)
     106    for (i = branches.begin(); i != branches.end(); i++)
    107107        (*i)->print(os, indent + 4);
    108108
     
    115115    Statement(_labels), condition(_condition), stmts(_statements), _isDefault(deflt)
    116116{
    117     if(isDefault() && condition != 0)
     117    if (isDefault() && condition != 0)
    118118        throw SemanticError("default with conditions");
    119119}
     
    126126    os << "\r" << string(indent, ' ');
    127127
    128     if(isDefault())
     128    if (isDefault())
    129129        os << "Default ";
    130130    else {
     
    136136
    137137    std::list<Statement *>::iterator i;
    138     for(i = stmts.begin(); i != stmts.end(); i++)
     138    for (i = stmts.begin(); i != stmts.end(); i++)
    139139        (*i)->print(os, indent + 4);
    140140}
     
    158158    // branches
    159159    std::list<Statement *>::iterator i;
    160     for(i = branches.begin(); i != branches.end(); i++)
     160    for (i = branches.begin(); i != branches.end(); i++)
    161161        (*i)->print(os, indent + 4);
    162162
     
    183183    os << string(indent, ' ') << ".... with body: " << endl;
    184184
    185     if(body != 0) body->print(os, indent + 4);
     185    if (body != 0) body->print(os, indent + 4);
    186186}
    187187
     
    216216
    217217    os << "\n\r" << string(indent + 2, ' ') << "statement block: \n";
    218     if(body != 0)
     218    if (body != 0)
    219219        body->print(os, indent + 4);
    220220
     
    244244    os << string(indent + 2, ' ') << "and handlers: " << endl;
    245245    std::list<Statement *>::iterator i;
    246     for(i = handlers.begin(); i != handlers.end(); i++)
     246    for (i = handlers.begin(); i != handlers.end(); i++)
    247247        (*i)->print(os, indent + 4);
    248248
     
    267267
    268268    os << "\r" << string(indent, ' ') << "... catching" << endl;
    269     if( decl ) {
     269    if ( decl ) {
    270270        decl->printShort( os, indent + 4 );
    271271        os << endl;
  • translator/SynTree/Type.cc

    rb87a5ed ra32b204  
    4040
    4141void Type::print( std::ostream &os, int indent ) const {
    42     if ( !forall.empty() ) {
     42    if ( ! forall.empty() ) {
    4343        os << "forall" << std::endl;
    4444        printAll( forall, os, indent + 4 );
  • translator/SynTree/TypeExpr.cc

    rb87a5ed ra32b204  
    2929TypeExpr::print( std::ostream &os, int indent ) const
    3030{
    31     if( type ) type->print( os, indent );
     31    if ( type ) type->print( os, indent );
    3232    Expression::print( os, indent );
    3333}
  • translator/SynTree/TypeSubstitution.cc

    rb87a5ed ra32b204  
    2121TypeSubstitution::~TypeSubstitution()
    2222{
    23     for( TypeEnvType::iterator i = typeEnv.begin(); i != typeEnv.end(); ++i ) {
     23    for ( TypeEnvType::iterator i = typeEnv.begin(); i != typeEnv.end(); ++i ) {
    2424        delete( i->second );
    2525    }
    26     for( VarEnvType::iterator i = varEnv.begin(); i != varEnv.end(); ++i ) {
     26    for ( VarEnvType::iterator i = varEnv.begin(); i != varEnv.end(); ++i ) {
    2727        delete( i->second );
    2828    }
     
    3232TypeSubstitution::operator=( const TypeSubstitution &other )
    3333{
    34     if( this == &other ) return *this;
     34    if ( this == &other ) return *this;
    3535    initialize( other, *this );
    3636    return *this;
     
    4848TypeSubstitution::add( const TypeSubstitution &other )
    4949{
    50     for( TypeEnvType::const_iterator i = other.typeEnv.begin(); i != other.typeEnv.end(); ++i ) {
     50    for ( TypeEnvType::const_iterator i = other.typeEnv.begin(); i != other.typeEnv.end(); ++i ) {
    5151        typeEnv[ i->first ] = i->second->clone();
    5252    }
    53     for( VarEnvType::const_iterator i = other.varEnv.begin(); i != other.varEnv.end(); ++i ) {
     53    for ( VarEnvType::const_iterator i = other.varEnv.begin(); i != other.varEnv.end(); ++i ) {
    5454        varEnv[ i->first ] = i->second->clone();
    5555    }
     
    6060{
    6161    TypeEnvType::iterator i = typeEnv.find( formalType );
    62     if( i != typeEnv.end() ) {
     62    if ( i != typeEnv.end() ) {
    6363        delete i->second;
    6464    }
     
    7070{
    7171    TypeEnvType::iterator i = typeEnv.find( formalType );
    72     if( i != typeEnv.end() ) {
     72    if ( i != typeEnv.end() ) {
    7373        delete i->second;
    7474        typeEnv.erase( formalType );
     
    8080{
    8181    TypeEnvType::const_iterator i = typeEnv.find( formalType );
    82     if( i == typeEnv.end() ) {
     82    if ( i == typeEnv.end() ) {
    8383        return 0;
    8484    } else {
     
    9999        subCount = 0;
    100100        freeOnly = true;
    101         for( TypeEnvType::iterator i = typeEnv.begin(); i != typeEnv.end(); ++i ) {
     101        for ( TypeEnvType::iterator i = typeEnv.begin(); i != typeEnv.end(); ++i ) {
    102102            i->second = i->second->acceptMutator( *this );
    103103        }
    104     } while( subCount );
     104    } while ( subCount );
    105105}
    106106
     
    109109{
    110110    BoundVarsType::const_iterator bound = boundVars.find( inst->get_name() );
    111     if( bound != boundVars.end() ) return inst;
     111    if ( bound != boundVars.end() ) return inst;
    112112   
    113113    TypeEnvType::const_iterator i = typeEnv.find( inst->get_name() );
    114     if( i == typeEnv.end() ) {
     114    if ( i == typeEnv.end() ) {
    115115        return inst;
    116116    } else {
     
    130130{
    131131    VarEnvType::const_iterator i = varEnv.find( nameExpr->get_name() );
    132     if( i == varEnv.end() ) {
     132    if ( i == varEnv.end() ) {
    133133        return nameExpr;
    134134    } else {
     
    144144{
    145145    BoundVarsType oldBoundVars( boundVars );
    146     if( freeOnly ) {
    147         for( std::list< TypeDecl* >::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
     146    if ( freeOnly ) {
     147        for ( std::list< TypeDecl* >::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
    148148            boundVars.insert( (*tyvar)->get_name() );
    149149        }
     
    218218{
    219219    os << std::string( indent, ' ' ) << "Types:" << std::endl;
    220     for( TypeEnvType::const_iterator i = typeEnv.begin(); i != typeEnv.end(); ++i ) {
     220    for ( TypeEnvType::const_iterator i = typeEnv.begin(); i != typeEnv.end(); ++i ) {
    221221        os << std::string( indent+2, ' ' ) << i->first << " -> ";
    222222        i->second->print( os, indent+4 );
     
    224224    }
    225225    os << std::string( indent, ' ' ) << "Non-types:" << std::endl;
    226     for( VarEnvType::const_iterator i = varEnv.begin(); i != varEnv.end(); ++i ) {
     226    for ( VarEnvType::const_iterator i = varEnv.begin(); i != varEnv.end(); ++i ) {
    227227        os << std::string( indent+2, ' ' ) << i->first << " -> ";
    228228        i->second->print( os, indent+4 );
  • translator/SynTree/TypeSubstitution.h

    rb87a5ed ra32b204  
    9090    FormalIterator formalIt = formalBegin;
    9191    ActualIterator actualIt = actualBegin;
    92     for( ; formalIt != formalEnd; ++formalIt, ++actualIt ) {
    93         if( TypeDecl *formal = dynamic_cast< TypeDecl* >( *formalIt ) ) {
    94             if( TypeExpr *actual = dynamic_cast< TypeExpr* >( *actualIt ) ) {
    95                 if( formal->get_name() != "" ) {
     92    for ( ; formalIt != formalEnd; ++formalIt, ++actualIt ) {
     93        if ( TypeDecl *formal = dynamic_cast< TypeDecl* >( *formalIt ) ) {
     94            if ( TypeExpr *actual = dynamic_cast< TypeExpr* >( *actualIt ) ) {
     95                if ( formal->get_name() != "" ) {
    9696                    TypeEnvType::iterator i = typeEnv.find( formal->get_name() );
    97                     if( i != typeEnv.end() ) {
     97                    if ( i != typeEnv.end() ) {
    9898                        delete i->second;
    9999                    }
     
    105105        } else {
    106106            // TODO: type check the formal and actual parameters
    107             if( (*formalIt)->get_name() != "" ) {
     107            if ( (*formalIt)->get_name() != "" ) {
    108108                varEnv[ (*formalIt)->get_name() ] = (*actualIt)->clone();
    109109            }
     
    152152TypeSubstitution::extract( TypeInstListIterator begin, TypeInstListIterator end, TypeSubstitution &result )
    153153{
    154     while( begin != end ) {
     154    while ( begin != end ) {
    155155        TypeEnvType::iterator cur = typeEnv.find( (*begin++)->get_name() );
    156         if( cur != typeEnv.end() ) {
     156        if ( cur != typeEnv.end() ) {
    157157            result.typeEnv[ cur->first ] = cur->second;
    158158            typeEnv.erase( cur );
     
    170170
    171171    TypeSubstitution sub = TypeSubstitution( formalBegin, formalEnd, actual );
    172     for( std::list< Declaration* >::iterator i = memberBegin; i != memberEnd; ++i ) {
     172    for ( std::list< Declaration* >::iterator i = memberBegin; i != memberEnd; ++i ) {
    173173        Declaration *newdecl = (*i)->clone();
    174174        sub.apply( newdecl );
  • translator/SynTree/TypeofType.cc

    rb87a5ed ra32b204  
    3131    Type::print( os, indent );
    3232    os << "type-of expression ";
    33     if( expr ) {
     33    if ( expr ) {
    3434        expr->print( os, indent );
    3535    }
  • translator/SynTree/Visitor.h

    rb87a5ed ra32b204  
    103103        }
    104104    }
    105     if ( !errors.isEmpty() ) {
     105    if ( ! errors.isEmpty() ) {
    106106        throw errors;
    107107    }
     
    129129        }
    130130    }
    131     if ( !errors.isEmpty() ) {
     131    if ( ! errors.isEmpty() ) {
    132132        throw errors;
    133133    }
Note: See TracChangeset for help on using the changeset viewer.