Changeset 1622af5 for src/main.cc


Ignore:
Timestamp:
Nov 9, 2021, 3:57:11 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
b7fd9daf
Parents:
36a05d7
Message:

Created CandidatePrinter? from AlternativePrinter? (seems to uncover a bug in CandidateFinder?).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r36a05d7 r1622af5  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Nov  8 11:42:00 2021
    13 // Update Count     : 656
     12// Last Modified On : Tue Nov  9 11:10:00 2021
     13// Update Count     : 657
    1414//
    1515
     
    6565#include "Parser/TypedefTable.h"            // for TypedefTable
    6666#include "ResolvExpr/AlternativePrinter.h"  // for AlternativePrinter
     67#include "ResolvExpr/CandidatePrinter.hpp"  // for printCandidates
    6768#include "ResolvExpr/Resolver.h"            // for resolve
    6869#include "SymTab/Validate.h"                // for validate
     
    318319                // add the assignment statement after the initialization of a type parameter
    319320                PASS( "Validate", SymTab::validate( translationUnit, symtabp ) );
    320                 if ( symtabp ) {
    321                         deleteAll( translationUnit );
    322                         return EXIT_SUCCESS;
    323                 } // if
    324 
    325                 if ( expraltp ) {
    326                         PassVisitor<ResolvExpr::AlternativePrinter> printer( cout );
    327                         acceptAll( translationUnit, printer );
    328                         return EXIT_SUCCESS;
    329                 } // if
    330 
    331                 if ( validp ) {
    332                         dump( translationUnit );
    333                         return EXIT_SUCCESS;
    334                 } // if
    335321
    336322                CodeTools::fillLocations( translationUnit );
     
    345331                        forceFillCodeLocations( transUnit );
    346332
     333                        if ( symtabp ) {
     334                                return EXIT_SUCCESS;
     335                        } // if
     336
     337                        if ( expraltp ) {
     338                                ResolvExpr::printCandidates( transUnit );
     339                                return EXIT_SUCCESS;
     340                        } // if
     341
     342                        if ( validp ) {
     343                                dump( move( transUnit ) );
     344                                return EXIT_SUCCESS;
     345                        } // if
     346
    347347                        PASS( "Translate Throws", ControlStruct::translateThrows( transUnit ) );
    348348                        PASS( "Fix Labels", ControlStruct::fixLabels( transUnit ) );
     
    383383                        translationUnit = convert( move( transUnit ) );
    384384                } else {
     385                        if ( symtabp ) {
     386                                deleteAll( translationUnit );
     387                                return EXIT_SUCCESS;
     388                        } // if
     389
     390                        if ( expraltp ) {
     391                                PassVisitor<ResolvExpr::AlternativePrinter> printer( cout );
     392                                acceptAll( translationUnit, printer );
     393                                return EXIT_SUCCESS;
     394                        } // if
     395
     396                        if ( validp ) {
     397                                dump( translationUnit );
     398                                return EXIT_SUCCESS;
     399                        } // if
     400
    385401                        PASS( "Translate Throws", ControlStruct::translateThrows( translationUnit ) );
    386402                        PASS( "Fix Labels", ControlStruct::fixLabels( translationUnit ) );
Note: See TracChangeset for help on using the changeset viewer.