Reader
forms
(Fn [(Ref ReaderDocument a)] (Result (Array (Box Located)) ParseErr))
(forms document)
converts an already-read document to compiler forms. Missing or invalid syntax is rejected; recovery never invents compilable source.
node-category
(Fn [(Ref ReaderNode a)] ReaderCategory)
(node-category node)
returns a lexical fact for a written leaf, without choosing a color.
parse
(Fn [(Ref String a)] (Result (Array (Box Located)) ParseErr))
(parse source)
strictly reads source into located compiler forms. Shares the grammar and recovery used for lossless documents, and rejects any issue. Comments are retained.
parse-form
(Fn [(Ref String a)] (Result Located ParseErr))
(parse-form source)
strictly reads exactly one form, including surrounding whitespace.
read-syntax
(Fn [(Ref String a)] ReaderDocument)
(read-syntax source)
reads complete, incomplete, or invalid source without discarding source syntax or executing reader macros. Uses the same grammar and recovery as strict parsing, retaining every written token.