Skip to main content

Crate moire_source_context

Crate moire_source_context 

Source

Structs§

CutResult

Functions§

cut_source
Given source content, a language name, and a target position, find the containing scope, classify its children into keep/cut, and return the modified source with /* ... */ placeholders for cut regions.
cut_source_compact
Aggressive context cutter for compact/collapsed displays.
extract_enclosing_fn
Extract the collapsed enclosing-function context for compact display.
extract_target_statement
Extract a compact, context-aware statement snippet around the target position.
highlighted_context_lines
Convert a CutResult into context lines with arborium syntax-highlighted HTML content.
text_context_lines
Convert a CutResult into context lines with plain text content (no highlighting).