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
//! # Eon: the human-friendly configuration format
//! Eon is a human-friendly configuration format that is designed to be easy to read and write.
//!
//! Example Eon document:
//!
//! ```text
//! // Comment
//! string: "Hello Eon!"
//! list: [1, 2, 3]
//! object: {
//! boolean: true
//! regex: '\d{3}-\d{3}-\d{4}'
//! }
//! map: {
//! 1: "map keys don't need to be strings"
//! 2: "they can be any Eon value"
//! }
//! special_floats: [+inf, -inf, +nan]
//! ```
//!
//! Read more at <https://github.com/emilk/eon>.
//!
//! This crate provides a parser and formatter for Eon.
//! It is used to implement the [`eonfmt`](http://crates.io/crates/eonfmt) CLI tool,
//! but also used by the [`eon`](http://crates.io/crates/eon) crate to parse and format Eon documents.
//!
//! You can use it to read and write Eon documents, with comments.
//! This can be useful for e.g. reading "docstrings" from an `.eon` file,
//! or for automate the editing an `.eon` file while preserving comments and formatting.
pub use crate::;
/// Parses an Eon file and re-indents and formats it in a pretty way.
///
/// ## Errors
/// Returns an error if the source is not valid Eon syntax.