Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r6de43b6 rbff09c8  
    1010// Author           : Richard C. Bilson
    1111// Created On       : Fri May 15 23:12:02 2015
    12 // Last Modified By : Peter A. Buhr
    13 // Last Modified On : Tue Oct 31 12:22:40 2017
    14 // Update Count     : 445
     12// Last Modified By : Andrew Beach
     13// Last Modified On : Wed Jul 26 14:38:00 2017
     14// Update Count     : 443
    1515//
    1616
     
    4444#include "ControlStruct/Mutate.h"           // for mutate
    4545#include "GenPoly/Box.h"                    // for box
     46#include "GenPoly/CopyParams.h"             // for copyParams
    4647#include "GenPoly/InstantiateGeneric.h"     // for instantiateGeneric
    4748#include "GenPoly/Lvalue.h"                 // for convertLvalue
     
    9394        codegenp = false,
    9495        prettycodegenp = false,
    95         linemarks = false;
     96        nolinemarks = false;
    9697
    9798static void parse_cmdline( int argc, char *argv[], const char *& filename );
     
    238239                } // if
    239240
     241                // OPTPRINT( "Concurrency" )
     242                // Concurrency::applyKeywords( translationUnit );
     243
    240244                // add the assignment statement after the initialization of a type parameter
    241245                OPTPRINT( "validate" )
     
    320324                OPTPRINT("instantiateGenerics")
    321325                GenPoly::instantiateGeneric( translationUnit );
     326                OPTPRINT( "copyParams" );
     327                GenPoly::copyParams( translationUnit );
    322328                OPTPRINT( "convertLvalue" )
    323329                GenPoly::convertLvalue( translationUnit );
     
    340346
    341347                CodeTools::fillLocations( translationUnit );
    342                 CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks );
     348                CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, ! nolinemarks );
    343349
    344350                CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
     
    378384
    379385void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    380         enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
     386        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
    381387
    382388        static struct option long_opts[] = {
     
    390396                { "grammar", no_argument, 0, Grammar },
    391397                { "libcfa", no_argument, 0, LibCFA },
    392                 { "line-marks", no_argument, 0, Linemarks },
    393                 { "no-line-marks", no_argument, 0, Nolinemarks },
    394398                { "no-preamble", no_argument, 0, Nopreamble },
    395399                { "parse", no_argument, 0, Parse },
     
    407411
    408412        int c;
    409         while ( (c = getopt_long( argc, argv, "abBcCdefglLmnNpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
     413        while ( (c = getopt_long( argc, argv, "abBcCdefglLmnpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
    410414                switch ( c ) {
    411415                  case Ast:
     
    447451                        libcfap = true;
    448452                        break;
    449                   case Linemarks:
    450                   case 'L':                                                                             // print lines marks
    451                         linemarks = true;
     453                  case 'L':                                                                             // surpress lines marks
     454                        nolinemarks = true;
    452455                        break;
    453456                  case Nopreamble:
    454457                  case 'n':                                                                             // do not read preamble
    455458                        nopreludep = true;
    456                         break;
    457                   case Nolinemarks:
    458                   case 'N':                                                                             // suppress line marks
    459                         linemarks = false;
    460459                        break;
    461460                  case Prototypes:
     
    509508                                assertf( false, "Unknown option: %s\n", argv[optind - 1] );
    510509                        } // if
    511                         #if __GNUC__ < 7
    512                         #else
    513                                 __attribute__((fallthrough));
    514                         #endif
    515510                  default:
    516511                        abort();
Note: See TracChangeset for help on using the changeset viewer.