pub fn collect_error_nodes(tree: &Tree) -> Vec<SyntaxDiagnostic>Expand description
Walks a tree-sitter Tree and collects a SyntaxDiagnostic for every
ERROR node and every “missing” node it contains, in document order.
This is purely a syntactic operation: it does not attempt to convert
anything to pactole-core domain models.
This variant has no access to the original source text, so ERROR
diagnostics cannot quote the unexpected text; prefer
collect_error_nodes_with_source when the source text is available
(as parse_document does internally).