| Crates.io | yaml_parser |
| lib.rs | yaml_parser |
| version | 0.2.3 |
| created_at | 2024-07-04 07:55:48.246035+00 |
| updated_at | 2025-05-08 13:38:18.640016+00 |
| description | Semi-tolerant YAML concrete syntax tree parser. |
| homepage | |
| repository | https://github.com/g-plane/pretty_yaml |
| max_upload_size | |
| id | 1291402 |
| size | 92,548 |
Semi-tolerant YAML concrete syntax tree parser.
match yaml_parser::parse(&code) {
Ok(tree) => println!("{tree:#?}"),
Err(err) => eprintln!("{err}"),
};
It produces rowan tree if succeeded. For consuming the tree, see rowan's docs.
If you need to build AST from CST, use ast module:
let root = yaml_parser::ast::Root::cast(tree).unwrap();
dbg!(root);
Tests come from official test suite.
MIT License
Copyright (c) 2024-present Pig Fang