diff options
Diffstat (limited to 'cli/cli/cli.cxx')
-rw-r--r-- | cli/cli/cli.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cli/cli/cli.cxx b/cli/cli/cli.cxx index 11cf6c0..d56f9e2 100644 --- a/cli/cli/cli.cxx +++ b/cli/cli/cli.cxx @@ -6,6 +6,7 @@ #include <string> #include <memory> // unique_ptr #include <fstream> +#include <utility> // move() #include <iostream> #include <libcutl/compiler/code-stream.hxx> @@ -16,7 +17,13 @@ #include <cli/parser.hxx> #include <cli/generator.hxx> -#include <cli/version.hxx> +#ifndef CLI_BOOTSTRAP +# include <cli/version.hxx> +#else +# define CLI_VERSION_ID 0 +# define CLI_VERSION_FULL 0 +# define CLI_COPYRIGHT "" +#endif using namespace std; using namespace cutl; @@ -115,8 +122,9 @@ main (int argc, char* argv[]) // Parse and generate. // - parser p (include_paths); - unique_ptr<semantics::cli_unit> unit (p.parse (ifs, path)); + parser p (include_paths, ops.generate_dep ()); + parser::parse_result r (p.parse (ifs, path)); + unique_ptr<semantics::cli_unit>& unit (r.unit); // Merge documentation variables from the command line. // @@ -137,7 +145,7 @@ main (int argc, char* argv[]) } generator g; - g.generate (ops, *unit, path); + g.generate (ops, move (*unit), move (r.dependencies), path); } catch (cli::exception const& ex) { |