Skip to main content

debian_control/lossless/
mod.rs

1//! Lossless parser for various Debian control files
2//!
3//! This library provides a parser for various Debian control files, such as `control`, `changes`,
4//! and apt `Release`, `Packages`, and `Sources` files. The parser is lossless, meaning that it
5//! preserves all formatting as well as any possible errors in the files.
6//!
7//! # Example with positioned errors
8//!
9//! ```
10//! use debian_control::lossless::{Control, PositionedParseError};
11//!
12//! let input = "Invalid: field\nBroken field without colon";
13//! let parsed = Control::parse(input);
14//!
15//! // Access positioned errors for precise error reporting
16//! for error in parsed.positioned_errors() {
17//!     println!("Error at {:?}: {}", error.range, error.message);
18//!     // Use error.range for IDE/language server integration
19//! }
20//! ```
21
22pub mod apt;
23pub mod buildinfo;
24pub mod changes;
25pub mod control;
26pub mod relations;
27pub use control::*;
28pub use deb822_lossless::{Parse, PositionedParseError};
29pub use relations::*;