class

Analyzer::Rust::Warp

Inherits Analyzer::Rust::RustEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object

Warp analyzer (tree-sitter port). Warp expresses each endpoint as one let_declaration whose value is a chain of filter combinators:

let get_user = warp::path("users")
    .and(warp::path::param::<u32>())
    .and(warp::path::end())
    .and(warp::get())
    .map(handler);

The analyzer walks every let_declaration, inspects its value subtree for the warp::* call shapes, and assembles a single Endpoint from them.

Constants

ROUTE_FN_EVIDENCE_RE = Regex.union("warp::path(", "warp::path!")

Precompiled union for collect_warp_mounts' per-function-body evidence check, so it costs a single PCRE2 match instead of two naive substring scans.

Class methods

tech_name
Source

Instance methods

analyze
Source
analyze_file(path : String) : Array(Endpoint)
Source
tech

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.

Source