//! Per-scan context — the bundle of mutable state every scanner needs.
//!
//! Built fresh by `scan_from` each loop iteration and passed to the
//! per-mode scanner functions. Holds:
//! - `input` — the input character slice (read-only).
//! - `state` — the mode stack and word/command-position flags.
//! - `spans` — the output span vector under construction.
//! - `checker` — `CommandChecker`. Only `scan_word` reads it (to
//! determine if a word is a known command), but it's bundled here
//! to keep every scanner's signature uniform.
use CommandChecker;
use ColorSpan;
use ScannerState;
pub