2024-02-08 06:12:14 +00:00
|
|
|
// Copyright 2015, Yuheng Chen.
|
|
|
|
// Copyright 2023, Ethiraric.
|
|
|
|
// See the LICENSE file at the top-level directory of this distribution.
|
2015-05-31 09:59:43 +00:00
|
|
|
|
2024-04-02 14:57:23 +00:00
|
|
|
//! YAML 1.2 parser implementation in pure Rust.
|
|
|
|
//!
|
|
|
|
//! **If you want to load to a YAML Rust structure or manipulate YAML objects, use `saphyr` instead
|
|
|
|
//! of `saphyr-parser`. This crate contains only the parser.**
|
|
|
|
//!
|
|
|
|
//! This is YAML 1.2 parser implementation and low-level parsing API for YAML. It allows users to
|
|
|
|
//! fetch a stream of YAML events from a stream of characters/bytes.
|
2015-05-31 09:59:43 +00:00
|
|
|
//!
|
|
|
|
//! # Usage
|
|
|
|
//!
|
2024-04-02 14:57:23 +00:00
|
|
|
//! This crate is [on github](https://github.com/saphyr-rs/saphyr-parser) and can be used by adding
|
|
|
|
//! `saphyr-parser` to the dependencies in your project's `Cargo.toml`.
|
2015-05-31 09:59:43 +00:00
|
|
|
//!
|
|
|
|
//! ```toml
|
2021-07-12 07:48:17 +00:00
|
|
|
//! [dependencies]
|
2024-06-13 20:18:27 +00:00
|
|
|
//! saphyr-parser = "0.0.2"
|
2015-05-31 09:59:43 +00:00
|
|
|
//! ```
|
2024-03-30 18:24:54 +00:00
|
|
|
//!
|
|
|
|
//! # Features
|
2024-03-30 18:39:53 +00:00
|
|
|
//! **Note:** With all features disabled, this crate's MSRV is `1.65.0`.
|
|
|
|
//!
|
2024-03-30 18:24:54 +00:00
|
|
|
//! #### `debug_prints`
|
|
|
|
//! Enables the `debug` module and usage of debug prints in the scanner and the parser. Do not
|
|
|
|
//! enable if you are consuming the crate rather than working on it as this can significantly
|
|
|
|
//! decrease performance.
|
|
|
|
//!
|
2024-03-30 18:39:53 +00:00
|
|
|
//! The MSRV for this feature is `1.70.0`.
|
2015-05-31 09:59:43 +00:00
|
|
|
|
2024-03-20 14:50:48 +00:00
|
|
|
#![warn(missing_docs, clippy::pedantic)]
|
2024-03-19 17:18:59 +00:00
|
|
|
|
2024-01-24 00:02:20 +00:00
|
|
|
pub(crate) mod char_traits;
|
2024-01-24 01:22:02 +00:00
|
|
|
#[macro_use]
|
|
|
|
pub(crate) mod debug;
|
2018-09-15 16:49:04 +00:00
|
|
|
pub mod parser;
|
|
|
|
pub mod scanner;
|
2015-05-24 19:29:52 +00:00
|
|
|
|
2024-04-02 14:57:23 +00:00
|
|
|
pub use crate::parser::{Event, EventReceiver, MarkedEventReceiver, Parser, Tag};
|
|
|
|
pub use crate::scanner::{Marker, ScanError, TScalarStyle};
|