Changeset e67a82d for src/main.cc


Ignore:
Timestamp:
Aug 20, 2020, 11:48:15 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d685cb0
Parents:
67ca73e (diff), 013b028 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

fix conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r67ca73e re67a82d  
    3131using namespace std;
    3232
    33 
     33#include "AST/Convert.hpp"
    3434#include "CompilationState.h"
    3535#include "../config.h"                      // for CFA_LIBDIR
     
    340340                } // if
    341341
    342                 PASS( "Resolve", ResolvExpr::resolve( translationUnit ) );
     342                if( useNewAST) {
     343                        auto transUnit = convert( move( translationUnit ) );
     344                        PASS( "Resolve", ResolvExpr::resolve( transUnit ) );
     345                        translationUnit = convert( move( transUnit ) );
     346                } else {
     347                        PASS( "Resolve", ResolvExpr::resolve( translationUnit ) );
     348                }
     349
    343350                if ( exprp ) {
    344351                        dump( translationUnit );
     
    458465        { "prototypes", no_argument, nullptr, 'p' },
    459466        { "deterministic-out", no_argument, nullptr, 'd' },
     467        { "old-ast", no_argument, nullptr, 'O'},
     468        { "new-ast", no_argument, nullptr, 'A'},
    460469        { "print", required_argument, nullptr, 'P' },
    461470        { "prelude-dir", required_argument, nullptr, PreludeDir },
     
    479488        "generate prototypes for prelude functions",            // -p
    480489        "don't print output that isn't deterministic",        // -d
     490        "Use the old-ast",                                    // -O
     491        "Use the new-ast",                                    // -A
    481492        "print",                                              // -P
    482493        "<directory> prelude directory for debug/nodebug",      // no flag
     
    584595                        break;
    585596                  case 'd':                                     // don't print non-deterministic output
    586                     deterministic_output = true;
     597                        deterministic_output = true;
     598                        break;
     599                  case 'O':                                     // don't print non-deterministic output
     600                        useNewAST = false;
     601                        break;
     602                  case 'A':                                     // don't print non-deterministic output
     603                        useNewAST = true;
    587604                        break;
    588605                  case 'P':                                                                             // print options
Note: See TracChangeset for help on using the changeset viewer.