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
43
44
45
46
47
48
49
50
//! # LiteDoc Core
//!
//! A deterministic, AI-token-efficient document format parser.
//!
//! LiteDoc provides an alternative to Markdown with explicit fenced block syntax,
//! making it ideal for AI consumption due to reduced ambiguity and lower token counts.
//!
//! ## Quick Start
//!
//! ```rust
//! use litedoc_core::{Parser, Profile};
//!
//! let input = "# Hello World\n\nThis is a **paragraph**.";
//! let mut parser = Parser::new(Profile::Litedoc);
//! let doc = parser.parse(input).unwrap();
//!
//! println!("Parsed {} blocks", doc.blocks.len());
//! ```
//!
//! ## Error Recovery
//!
//! The parser supports graceful error recovery:
//!
//! ```rust
//! use litedoc_core::{Parser, Profile};
//!
//! let input = "::unknown\nsome content\n::";
//! let mut parser = Parser::new(Profile::Litedoc);
//! let result = parser.parse_with_recovery(input);
//!
//! // Document is still parsed, errors are collected
//! println!("Blocks: {}, Errors: {}", result.document.blocks.len(), result.errors.len());
//! ```
//!
//! ## Profiles
//!
//! - `Profile::Litedoc` - Full native syntax with explicit fencing
//! - `Profile::Md` - CommonMark + GFM subset
//! - `Profile::MdStrict` - CommonMark core only
pub use ;
pub use ;
pub use ;