Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r22bc276 r2b7bf59  
    540540                extension( nameExpr );
    541541                OperatorInfo opInfo;
    542                 if ( operatorLookup( nameExpr->get_name(), opInfo ) ) {
    543                         assert( opInfo.type == OT_CONSTANT );
    544                         output << opInfo.symbol;
     542                if ( operatorLookup( nameExpr->name, opInfo ) ) {
     543                        if ( opInfo.type == OT_CONSTANT ) {
     544                                output << opInfo.symbol;
     545                        } else {
     546                                output << opInfo.outputName;
     547                        }
    545548                } else {
    546549                        output << nameExpr->get_name();
     
    879882
    880883        void CodeGenerator::postvisit( CaseStmt * caseStmt ) {
     884                updateLocation( caseStmt );
     885                output << indent;
    881886                if ( caseStmt->isDefault()) {
    882887                        output << "default";
     
    10201025} // namespace CodeGen
    10211026
     1027std::ostream & operator<<( std::ostream & out, const BaseSyntaxNode * node ) {
     1028        if ( node ) {
     1029                node->print( out );
     1030        } else {
     1031                out << "nullptr";
     1032        }
     1033        return out;
     1034}
     1035
    10221036// Local Variables: //
    10231037// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.