The most container blocks (block quotes and list items) a Markdown file
may hold open at once and still be parsed. The Markdown grammar’s block
scanner saves its open blocks into tree-sitter’s fixed 1024-byte state
buffer without a bounds check, 4 bytes per block after a 5-byte header,
so 255 open blocks overrun it and tree-sitter aborts the whole process
(tree-sitter-md 0.5.3 under tree-sitter 0.26). Half that leaves room
for the overestimate markdown_too_deep_to_parse makes.
Rust function attributes that expose the function to code outside the Rust
call graph. This list is deliberately conservative: it covers known ABI,
wasm, constructor/destructor, and Tauri command entry points, but it does not
guess route macro shapes from web frameworks.
Navigation includes trait members already known to the call graph without
changing the parser table persisted in content records. Both stored and
freshly parsed tables use the same ownership and duplicate checks.
extract_symbols_from_tree, with nav walking a Rust tree and
answering its parent and sibling lookups. Other languages run tree-sitter
queries, which walk the tree themselves.
Whether source, to be parsed as lang, is Markdown that could hold
more than MARKDOWN_MAX_OPEN_BLOCKS container blocks open at once, and
so must not reach the Markdown grammar. Every place that parses
Markdown checks this first.