Skip to main content

mandible_core/
lib.rs

1//! `mandible-core`: the shared intermediate representation (IR) every mandible
2//! extraction tier normalizes into, and the merge logic that combines
3//! several tiers' output for the same node into one.
4//!
5//! See spec §4. This crate has no knowledge of any specific tool, tier, or
6//! terminal library — it is pure data model plus the sanitization and merge
7//! rules that keep that data model trustworthy.
8
9#![forbid(unsafe_code)]
10#![warn(missing_docs)]
11
12mod merge;
13mod node;
14mod noderef;
15mod provenance;
16mod text;
17
18pub use merge::{
19    merge_flag_lists, merge_nodes, merge_positional_lists, merge_subcommand_lists, pair_aliases,
20    MergeError,
21};
22pub use node::{is_command_name_shaped, CommandNode, Example, Flag, Positional, ValueKind};
23pub use noderef::{resolve, resolve_flag, resolve_mut, FlagKey, NodeRef};
24pub use provenance::{Authority, Axis, ManFormat, Provenance, Source};
25pub use text::{Text, MAX_TEXT_CHARS};