Skip to main content

substrate_data/forms/text/
mod.rs

1//! The text syntax: JSON, plus `//` and `/* */` comments, trailing commas
2//! and unquoted keys (the part of JSON5 editors already understand).
3//!
4//! [`parse`] keeps where every value is ([`Spans`]), so a schema error at
5//! `entries[2].pages[0].item` can point at its line. Typed values stay
6//! strings here — the schema decides what a string means.
7
8mod comments;
9mod doc;
10mod line_col;
11mod parser;
12mod scan;
13mod span;
14mod spans;
15mod syntax_error;
16mod writer;
17
18#[cfg(test)]
19mod tests;
20
21pub use comments::with_comments;
22pub use doc::Doc;
23pub use line_col::LineCol;
24pub use parser::{MAX_DEPTH, parse, parse_ref, parse_value};
25pub use span::Span;
26pub use spans::Spans;
27pub use syntax_error::SyntaxError;
28pub(crate) use writer::float_string;
29pub use writer::{Writer, to_string, to_string_pretty, write_string};