Crate styx_format

Crate styx_format 

Source
Expand description

§styx-format

crates.io documentation MIT/Apache-2.0 licensed

Core formatting and parsing utilities for the Styx configuration language. Handles document parsing, validation, and pretty-printing.

§Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

…along with corporate sponsors:

AWS Zed Depot

…without whom this work could not exist.

§License

Licensed under either of:

at your option. Core formatting and parsing utilities for Styx.

This crate provides the low-level building blocks for Styx serialization and deserialization, independent of any specific framework (facet, serde, etc.).

Structs§

FormatOptions
Options for Styx serialization.
StyxWriter
Low-level Styx output writer.

Functions§

can_be_bare
Check if a string can be written as a bare scalar.
count_escapes
Count escape sequences needed for a quoted string.
count_newlines
Count newlines in a string.
escape_quoted
Escape a string for quoted output.
format_cst
Format a Styx document from its CST.
format_object_braced
Format an Object directly (with braces), not as a root document.
format_source
Format a Styx document from source text.
format_value
Format a Value as a Styx document string.
format_value_default
Format a Value as a Styx document string with default options.
unescape_quoted
Unescape a quoted string.