class

Analyzer::Rust::Rocket

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

Rocket analyzer (tree-sitter port). Rocket attaches routes via #[get("/x")] / #[post("/x", data = "<body>")] outer attribute macros. tree-sitter-rust leaves macro argument lists as token_tree, but the lexer still tags string_literal / identifier children inside — we walk those for the route path, the data = "<...>" form, query / path angle-bracket params, and CookieJar / headers().get(...) body uses.

Constants

HTTP_VERBS = Set {"get", "post", "put", "delete", "patch", "head", "options"}
MOUNT_INDEX_EVIDENCE_RE = Regex.union("routes!", ".mount(", "routes as")

Precompiled union for build_mount_index's per-file evidence gate, so it costs a single PCRE2 match instead of three 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

Nested types