syncdoc_core/
lib.rs

1/// syncdoc-core: documentation injection helper macros
2pub mod config;
3pub mod debug;
4mod doc_injector;
5mod omnibus;
6pub mod parse;
7pub mod path_utils;
8pub mod token_processors;
9
10pub use doc_injector::{module_doc_impl, omnidoc_impl};
11pub use omnibus::inject_all_docs_impl;
12
13/// Macro for debug output in syncdoc.
14///
15/// Prints to stderr only if debug output is enabled via the atomic flag (tests do this using ctor)
16/// or the `SYNCDOC_DEBUG` environment variable at startup.
17#[macro_export]
18macro_rules! syncdoc_debug {
19    ($($arg:tt)*) => {
20        if $crate::debug::is_enabled() {
21            eprintln!("[SYNCDOC DEBUG] {}", format!($($arg)*));
22        }
23    };
24}