Пример #1
0
int main(int argc, char** argv) {
    // This program recursively finds and builds all files in the source
    // directory, and then generates the output in the lib/bin directory.
    env->workspace_load();
    env->output(".");
    env->make(true);
    env->monolithic_build(false);

    argp = new ArgParser(env, argc, argv);
    load_options(); 
    parse_options();
    save_options();

    Builder::Ptr builder(new Builder(env));
    return builder->errors();
}
Пример #2
0
int main(int argc, char** argv) {
    // Create a new empty environment to store the AST and symbols tables, and
    // set the options for compilation.
    argp = new ArgParser(env, argc, argv);
    env->output("doc");
    env->generator("Markdown");

    parse_options();
    File::mkdir(env->output());
    env->workspace_load();

    // Run the compiler.  Output to a temporary file if the compiler will
    // continue on to another stage; otherwise, output the file directly.
    Parser::Ptr parser(new Parser(env));
    SemanticAnalyzer::Ptr semant(new SemanticAnalyzer(env));
    MarkdownGenerator::Ptr md(new MarkdownGenerator(env));

    return 0;
}