class
Analyzer::Crystal::Kemal
Defined in:
analyzer/analyzers/crystal/kemal.crConstant Summary
-
MACRO_VAR_PATTERN =
/\{\{\s*(\w+)\s*=\s*([A-Za-z_][\w:]*)\s*\}\}/ -
Compile-time macro var assignment, e.g.
{{namespace = Routes::API::V1}}. invidious sets it once, then registers 50+ routes asget "/…", {{namespace}}::Videos, :videos— substituting it back lets those routes resolve their controller and carry callees. -
MOUNT_PATTERN =
/^\s*mount\s+["'](.+?)["']\s*,\s*(\w+)/ -
NAMESPACE_PATTERN =
/^(\s*)(?:(\w+)\.)?namespace\s+["'](.+?)["']/ -
ROUTER_PATTERN =
/^\s*(\w+)\s*=\s*Kemal::Router\.new/
Instance Method Summary
- #analyze
- #analyze_file(path : String) : Array(Endpoint)
- #line_to_endpoint(content : String) : Endpoint
- #line_to_param(content : String) : Param