1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! A lossless CST parser for DCF (Debian Control Format) — R's `DESCRIPTION`
//! format.
//!
//! This is a **second grammar** in this crate, independent of the R one. It
//! exists because `DESCRIPTION` is not just a bag of facts to scrape: it wants
//! spans (for diagnostics), record structure, and byte-for-byte round-tripping
//! (for formatting).
//!
//! - [`syntax`] — `SyntaxKind`, `DcfLanguage`, and the node/token aliases.
//! - [`parser`] — `parse`, `reconstruct`, and `ParseOutput`.
//! - [`ast`] — typed wrappers; **the** way to read a document from outside
//! this module, so no consumer ever has to name the second `SyntaxKind`.
//!
//! Losslessness holds exactly as it does for the R grammar:
//! `reconstruct(text) == text`, byte for byte. Errors never abort the parse —
//! diagnostics ride a side channel and every byte stays in the tree.
//!
//! ```
//! use arity_parser::dcf;
//!
//! let output = dcf::parse("Package: mypkg\nDepends: R (>= 4.1.0)\n");
//! let value = output.document().field("Depends").unwrap().folded_value();
//! assert_eq!(value, "R (>= 4.1.0)");
//! ```
//!
//! Two `SyntaxKind` enums now exist in this crate. They are distinct types
//! sharing a name, disambiguated by module path — never glob-import both.
pub use ;
pub use ;
pub use ;
pub use ;
pub use crateParseDiagnostic;