[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/iopenstack/cppfront/main/source/cppfront.cpp [Back]  [Original]

//  Copyright 2022-2024 Herb Sutter
//  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//  
//  Part of the Cppfront Project, under the Apache License v2.0 with LLVM Exceptions.
//  See https://github.com/hsutter/cppfront/blob/main/LICENSE for license information.


//===========================================================================
//  main - driver
//===========================================================================

#include "to_cpp1.h"

static auto flag_debug_output = false;
static cpp2::cmdline_processor::register_flag cmd_debug(
    9,
    "debug",
    "Emit compiler debug output",
    []{ flag_debug_output = true; }
);

static auto flag_quiet = false;
static cpp2::cmdline_processor::register_flag cmd_quiet(
    9,
    "quiet",
    "Print only error output",
    []{ flag_quiet = true; }
);

auto main(
    int   argc,
    char* argv[]
)
    -> int
{
    using namespace cpp2;

    cmdline.set_args(argc, argv);
    cmdline.process_flags();

    if (cmdline.help_was_requested()) {
        return EXIT_SUCCESS;
    }

    if (cmdline.arguments().empty()) {
        std::cerr 

Web Proxy Viewer  |  New URL  |  Original Page