Analyzer::Crystal::Kemal
Inherits Analyzer::Crystal::CrystalEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object
Constants
Compile-time macro var assignment, e.g. {{namespace = Routes::API::V1}}.
invidious sets it once, then registers 50+ routes as
get "/…", {{namespace}}::Videos, :videos — substituting it back lets
those routes resolve their controller and carry callees.
Kemal's query route DSL (RFC 10008, kemalcr/kemal#769) is
Kemal-specific, unlike get/post/etc. which the shared engine's
SIMPLE_ROUTE_RE already covers for every Crystal analyzer (Amber,
Lucky). It's stitched in via match_crystal_simple_route(..., extra:)
instead of touching that shared pattern, mirroring Lucky's TRACE
extra route. The same (?:^|[^.\w]) lead-in that keeps before_get
/ after_get from matching get also keeps before_query /
after_query filters from matching here — they must not emit
endpoints.
serve_static false / serve_static(false) — checked on every source
line, so the two fixed OR-ed String#includes? substring scans are
precompiled into a single regex union (one PCRE2 JIT scan per line
instead of two naive substring scans).
Class methods
Instance methods
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.