Expand description
Positional and structural indexes over parsed shell scripts.
The indexer complements shuck-parser by building compact lookup tables for
source lines, comments, syntactic regions, heredoc bodies, and physical line
continuations. It is intended to be built once from parser output and then
shared by semantic analysis, lint rules, suppressions, formatters, and report
rendering.
All positions are byte offsets represented with shuck_ast::TextSize and
shuck_ast::TextRange. The crate does not build a character index: callers
that need display columns should combine these byte offsets with the original
source text at the UI boundary.
Indexer is the preferred construction path when parser output is
available. The lower-level indexes are also exported for integrations that
only need line mapping or that already have an AST-shaped source of comments
or regions.
Structs§
- Comment
Index - Comment lookup types derived from parser output. Comment ranges and line-oriented lookup metadata.
- Indexed
Comment - Comment lookup types derived from parser output. A source comment with resolved positional metadata.
- Indexed
Heredoc - Structural region indexes over parsed shell source. Indexed metadata for one heredoc body and its source closer.
- Indexer
- Pre-computed positional and structural index over a parsed shell script.
- Indexer
Options - Optional index families that are not needed by every consumer.
- Line
Index - Line-based offset lookup utilities. Maps between byte offsets and 1-based source lines.
- Region
Index - Structural region indexes over parsed shell source. Byte ranges of syntactic regions where special rules apply.
Enums§
- Line
Ending Style - Line-based offset lookup utilities. Source line-ending style inferred while indexing physical lines.
- Region
Kind - Structural region indexes over parsed shell source. A syntactic region that affects source interpretation.