Documentation Generation โ
Problem โ
API docs need signatures, not prose guesses โ parameter lists, return positions, nesting.
Why tree-sitter.zig helps โ
Queries extract declarations structurally; ranges map them back to source for linked output.
API โ
Query captures for declaration shapes; Node.text and range for rendering. #set! settings travel on patterns (query.propertySettings), while #select-adjacent! / #strip! apply through query.directives.selectAdjacent / stripText โ the native equivalent of the tags-crate doc pipeline (see examples/query_directives.zig).
Architecture โ
text
Parse โ query declarations โ render signatures โ link to ranges