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
51
52
53
54
55
56
57
//! oxc-yaml-parser is a YAML 1.2 parser that produces a comment-preserving,
//! span-faithful typed AST, designed for building formatters.
//!
//! The AST mirrors [yaml-unist-parser](https://github.com/prettier/yaml-unist-parser)'s
//! node shapes (the AST Prettier's YAML printer consumes). Scalar values are
//! not cooked: consumers slice the original source through spans.
//!
//! ## Basic Usage
//!
//! ```rust
//! use oxc_yaml_parser::{Allocator, Parser};
//!
//! let allocator = Allocator::default();
//! let parser = Parser::new(&allocator, "key: value # comment");
//! match parser.parse() {
//! Ok(root) => {
//! assert_eq!(root.children.len(), 1);
//! assert_eq!(root.comments.len(), 1);
//! }
//! Err(error) => {
//! // Syntax error with span; no partial AST is produced.
//! println!("{error}");
//! }
//! }
//! ```
pub use ;
pub use Allocator;
pub use Parser;
pub use Span;
/// Size regression guards, in the spirit of oxc_ast's generated assertions:
/// enums stay pointer-sized-plus-tag, and hot token types stay small.