Expand description
Tolerant parsing of .pactole source text into a concrete syntax tree.
Structs§
- Parsed
Document - A parsed
.pactolesource text, holding the original source, the tree-sitter concrete syntax tree, and any syntax diagnostics collected while walking the tree.
Functions§
- analyze
- Alias for
parse_document, provided for callers that prefer ananalyzenaming convention (e.g. editor tooling or language servers). - collect_
error_ nodes - Walks a tree-sitter
Treeand collects aSyntaxDiagnosticfor everyERRORnode and every “missing” node it contains, in document order. - collect_
error_ nodes_ with_ source - Like
collect_error_nodes, but also takes the original source text so thatERRORdiagnostics can include a snippet of the unexpected text, in addition to the syntactic context (surrounding directive/node kind). - parse_
document - Parses
sourceas a.pactoledocument and collects syntax diagnostics.