jaml/parser.rs
1//! Parse JAML text into a [`Value`].
2//!
3//! The main entry point is [`parse`], which parses a string into a [`Value`].
4//!
5//! ```
6//! use jaml::parse;
7//!
8//! let value = parse(r#"
9//! name: "Alice"
10//! age: 30
11//! "#).unwrap();
12//! assert!(value.is_map());
13//! ```
14
15use crate::Value;
16
17mod error;
18mod indent;
19mod parse;
20
21pub use error::{Error, Result};
22
23/// Parse a JAML string into a [`Value`].
24pub fn parse(input: &str) -> Result<Value> {
25 parse::parse_impl(input)
26}