class

Analyzer::Rust::Loco

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

Loco analyzer (tree-sitter port). Loco follows Rails conventions: pub async fn <action> inside a controller module/impl becomes a RESTful endpoint whose path/method derive from the action name. Loco rides on Axum, so parameter extraction picks up the standard Axum extractor types (Path<T>, Query<T>, Json<T>, Form<T>, HeaderMap).

Constants

HTTP_VERBS = Set {"get", "post", "put", "delete", "patch", "head", "options", "trace"}
REST_ACTIONS = Set {"index", "show", "new", "create", "edit", "update", "destroy", "delete"}

Class methods

tech_name
Source

Instance methods

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