Ignore:
Timestamp:
May 17, 2015, 1:19:35 PM (9 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}
Note: See TracChangeset for help on using the changeset viewer.