Expand description
Lossless Scheme S-expression parser and editor (toml_edit-style CST).
Every byte of the source (whitespace, comments, escapes) is stored in the
tree, so parse(s).to_string() == s holds by construction; edits splice
in new nodes while untouched regions survive verbatim.
use scheme_edit::Document;
let src = "; header\n(list (a 1)\t(b 2))\n";
let doc = Document::parse(src).unwrap();
assert_eq!(doc.to_string(), src);Structs§
- Document
- A whole source file: top-level forms plus all surrounding trivia.
- Parse
Error
Enums§
- Item
- One element of a list body or the top level. Whitespace and comments are items like any other, so emitting a document is pure concatenation.
- List
Kind - Node
Functions§
- atom
- Any atom rendered verbatim (numbers, booleans, keywords, …).
- escape_
string - The quoted, escaped literal as text:
a"b->"a\"b". - list
- A paren list with children separated by single spaces.
- pretty
- Render NODE in guix house style starting at column INDENT.
- quoted_
sym 'name- string_
lit - A string literal node; escapes
\and"only. - sym
- A symbol atom.