Expand description
ct-outline’s heuristic declaration detection.
A rule pack per language turns a file’s text into ordered Entry rows —
kind, name, 1-based start:end span, and nesting depth. Detection is
line-pattern matching plus a block heuristic per language family: brace
matching for Rust (over comment/string-stripped text), indentation for
Python, heading levels for Markdown (fenced code blocks ignored). It is a
comprehension aid, not a parser: start lines are exact; an end the
heuristic cannot derive is None (rendered start:?), never a guess.
Structs§
- Entry
- One detected declaration.
Enums§
- Lang
- A supported language rule pack, keyed by file extension via
language_for.
Functions§
- language_
for - The rule pack for a file extension, or
Nonewhen the language is not (yet) supported. - outline
- Outline
textwith thelangrule pack, in source order.