diff options
Diffstat (limited to 'cli/cli/cli.cxx')
-rw-r--r-- | cli/cli/cli.cxx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/cli/cli/cli.cxx b/cli/cli/cli.cxx index 754c5ff..d56f9e2 100644 --- a/cli/cli/cli.cxx +++ b/cli/cli/cli.cxx @@ -6,9 +6,10 @@ #include <string> #include <memory> // unique_ptr #include <fstream> +#include <utility> // move() #include <iostream> -#include <cutl/compiler/code-stream.hxx> +#include <libcutl/compiler/code-stream.hxx> #include <cli/semantics/doc.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) { |