Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rda9d79b r593370c  
    116116        }
    117117
    118         CodeGenerator::CodeGenerator( std::ostream & os, bool pretty, bool genC, bool lineMarks, bool printExprTypes ) : indent( CodeGenerator::tabsize ), output( os ), printLabels( *this ), pretty( pretty ), genC( genC ), lineMarks( lineMarks ), printExprTypes( printExprTypes ), endl( *this ) {}
     118        CodeGenerator::CodeGenerator( std::ostream & os, bool pretty, bool genC, bool lineMarks ) : indent( CodeGenerator::tabsize ), output( os ), printLabels( *this ), pretty( pretty ), genC( genC ), lineMarks( lineMarks ), endl( *this ) {}
    119119
    120120        string CodeGenerator::mangleName( DeclarationWithType * decl ) {
     
    157157                node->print( ss );
    158158                assertf( false, "Unhandled node reached in CodeGenerator: %s", ss.str().c_str() );
    159         }
    160 
    161         // *** Expression
    162         void CodeGenerator::previsit( Expression * node ) {
    163                 previsit( (BaseSyntaxNode *)node );
    164                 GuardAction( [this, node](){
    165                         if ( printExprTypes ) {
    166                                 output << " /* " << genType( node->result, "", pretty, genC ) << " */ ";
    167                         }
    168                 } );
    169159        }
    170160
     
    596586                        output << ")";
    597587                } // if
    598                 castExpr->arg->accept( *visitor );
    599                 output << ")";
    600         }
    601 
    602         void CodeGenerator::postvisit( KeywordCastExpr * castExpr ) {
    603                 assertf( ! genC, "KeywordCast should not reach code generation." );
    604                 extension( castExpr );
    605                 output << "((" << castExpr->targetString() << " &)";
    606                 castExpr->arg->accept( *visitor );
     588                castExpr->get_arg()->accept( *visitor );
    607589                output << ")";
    608590        }
Note: See TracChangeset for help on using the changeset viewer.