Analyzer::Clojure::Helper
Shared helpers for the Clojure framework analyzers (CLI, Compojure, Pedestal, Reitit, Ring). Every one of them walks s-expressions the same way, so the scanning primitives live here instead of being copied per analyzer.
The primitives themselves belong to the parser layer, so this is only a
thin adapter over Noir::ClojureScanner (src/miniparsers/). Keeping a
second copy here is what let a reader bug — \( counted as a real open
paren — live on in the analyzers after it was fixed in the miniparser.
All of them operate on byte offsets into the raw source (byte_at), never
on character indices, so the offsets they return stay usable with
String#byte_slice on sources containing non-ASCII text.
Instance methods
Find the offset of the delimiter closing the one at index, skipping
over comments, strings and character literals so a ) inside ";)" or a
\( never closes a form. Returns index unchanged when no match is
found.
Advance from the \ opening a character literal (\a, \", \(,
\newline, \uXXXX, …) to the literal's last byte.
Advance past a ; line comment, stopping on the newline that ends it.