Changeset 019b2d3 for src/main.cc


Ignore:
Timestamp:
Dec 22, 2022, 3:17:52 PM (17 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
64b3cda
Parents:
be3b952
Message:

Moved new to old ast conversion up into the RunParser? module. As far as main is concerned the new ast is used from the beginning (except for LinkageSpec::Spec).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rbe3b952 r019b2d3  
    299299                } // if
    300300
    301                 translationUnit = buildUnit();
     301                auto transUnit = buildUnit();
    302302
    303303                if ( astp ) {
    304                         dump( translationUnit );
    305                         return EXIT_SUCCESS;
    306                 } // if
    307 
    308                 // Temporary: fill locations after parsing so that every node has a location, for early error messages.
    309                 // Eventually we should pass the locations from the parser to every node, but this quick and dirty solution
    310                 // works okay for now.
    311                 CodeTools::fillLocations( translationUnit );
     304                        dump( std::move( transUnit ) );
     305                        return EXIT_SUCCESS;
     306                } // if
     307
    312308                Stats::Time::StopBlock();
    313309
     
    316312                        ast::pass_visitor_stats.max = Stats::Counters::build<Stats::Counters::MaxCounter<double>>("Max depth - New");
    317313                }
    318                 auto transUnit = convert( std::move( translationUnit ) );
    319 
    320                 forceFillCodeLocations( transUnit );
    321314
    322315                PASS( "Hoist Type Decls", Validate::hoistTypeDecls( transUnit ) );
Note: See TracChangeset for help on using the changeset viewer.