class

Analyzer::Rust::ActixWeb

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

actix-web analyzer (tree-sitter port). actix-web wires routes via #[get("/path")] / #[post(...)] attribute macros that sit as siblings of the function_item they decorate (this is how tree-sitter-rust models outer attributes — they aren't children of the item they attach to). The analyzer walks every container and pairs each routing attribute with the function_item that follows it, skipping intermediate attribute_items and doc comments.

Constants

BUILDER_PASS_EVIDENCE_RE = Regex.union(".route(", "resource(")

Precompiled union for analyze_file's builder-pass evidence gate, so it costs a single PCRE2 match instead of two naive substring scans.

HTTP_VERBS = Set {"get", "post", "put", "delete", "patch", "head", "options"}

Class methods

tech_name
Source

Instance methods

analyze
Source
analyze_file(path : String) : Array(Endpoint)
Source
extract_function_params(function : LibTreeSitter::TSNode, source : String, endpoint : Endpoint)

Walk the function's parameters once and tag the endpoint with whichever extractor types appear. Each parameter's text is examined as a single slice — equivalent to the per-line scan in the legacy analyzer, bounded to the parameter list and free of comment / string-literal false positives.

Source
extract_path_params(route : String, endpoint : Endpoint)

Path params like /users/{id}, the typed/regex /users/{id:\d+} form, and the tail-match /files/{path:.*} form — all normalise to the bare param name.

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