diff options
author | Minijackson <minijackson@riseup.net> | 2019-12-21 12:13:21 +0100 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2019-12-21 12:13:21 +0100 |
commit | e773caea8010b87726ea524d31798fb2e43e12f4 (patch) | |
tree | 9034295831afb25f4bfea5a05d9f83d03e69e86c /src/main.rs | |
parent | de896baff7e97fac4dde79078c9a2fa1c652576b (diff) | |
download | poseidoc-e773caea8010b87726ea524d31798fb2e43e12f4.tar.gz poseidoc-e773caea8010b87726ea524d31798fb2e43e12f4.zip |
newtype in types, more generator config, parsing -> parser
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index b42d73c..5c613e0 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | mod cli; | 3 | mod cli; |
4 | mod config; | 4 | mod config; |
5 | mod generator; | 5 | mod generator; |
6 | mod parsing; | 6 | mod parser; |
7 | mod types; | 7 | mod types; |
8 | 8 | ||
9 | #[macro_use] | 9 | #[macro_use] |
@@ -87,12 +87,17 @@ fn start(codemap: &mut CodeMap) -> Result<()> { | |||
87 | //let file = file.clone(); | 87 | //let file = file.clone(); |
88 | let config = load_effective_config(cli, codemap)?; | 88 | let config = load_effective_config(cli, codemap)?; |
89 | 89 | ||
90 | let entities = parsing::clang::parse_compile_commands(&config.clang, codemap)?; | 90 | let entities = parser::clang::parse_compile_commands(&config.clang, codemap)?; |
91 | //let manager = parse_file(file, &config.extra_clang_args); | 91 | //let manager = parse_file(file, &config.extra_clang_args); |
92 | 92 | ||
93 | let base_output_dir = std::path::Path::new("doc"); | 93 | let base_output_dir = std::path::Path::new("doc"); |
94 | generate(&base_output_dir, entities, &config.generator)?; | 94 | generate(&base_output_dir, entities, &config.generator)?; |
95 | } | 95 | } |
96 | Command::Inspect => { | ||
97 | let config = load_effective_config(cli, codemap)?; | ||
98 | let entities = parser::clang::parse_compile_commands(&config.clang, codemap)?; | ||
99 | serde_json::to_writer_pretty(std::io::stdout().lock(), &entities)?; | ||
100 | } | ||
96 | Command::Config { | 101 | Command::Config { |
97 | command: ConfigCommand::Default, | 102 | command: ConfigCommand::Default, |
98 | } => { | 103 | } => { |