pub fn parse_document(source: &str) -> ParsedDocumentExpand description
Parses source as a .pactole document and collects syntax diagnostics.
This function never fails: malformed input yields a ParsedDocument whose
ParsedDocument::diagnostics describe the ERROR/MISSING nodes found in
the resulting concrete syntax tree.
ยงPanics
Panics if the tree-sitter parser fails to load the Pactole grammar or fails to produce a tree for a string input. Either case indicates a build-time or library invariant violation rather than a user-facing parse error.