summaryrefslogtreecommitdiff
path: root/cli/cli/cli.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-09-16 18:39:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-09-20 12:38:32 +0300
commitd90cabcb1f6ecb0de2c4d2f32b9d8ccb45f0156f (patch)
treea0e78d5c2feeb0d9601aab5d40a7b0b58929bc9a /cli/cli/cli.cxx
parent1486a4f2333d28b1335211acb1e072caecb62761 (diff)
Add --generate-dep option
Diffstat (limited to 'cli/cli/cli.cxx')
-rw-r--r--cli/cli/cli.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/cli/cli.cxx b/cli/cli/cli.cxx
index f1196de..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>
@@ -121,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.
//
@@ -143,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)
{