class
Analyzer::Rust::Rocket
- Analyzer::Rust::Rocket
- Analyzer::Rust::RustEngine
- Analyzer
- Reference
- Object
Overview
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.
Defined in:
analyzer/analyzers/rust/rocket.crConstant Summary
-
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.