Skip to main content

Crate bonsai_parser

Crate bonsai_parser 

Source
Expand description

Tree-sitter parse cache.

Handles the “parse this file with the right grammar, incrementally if we can” side of the pipeline. Parsing is not quite free — we keep the previous tree_sitter::Tree around so the next reparse can use it as a hint. Cache identity includes the VFS instance, file, adapter, and exact grammar variant; each entry retains the newest immutable source version it has parsed.

Structs§

ParsedFile
ParserCache
Concurrent parse cache. Cheap to clone; parser instances are pooled by exact grammar variant while parsed tree cache reads use an RwLock.
ParserOptions
Parser-cache configuration.

Enums§

ParseError