struct
Noir::TreeSitterGoRouteExtractor::ScopedConfig
- Noir::TreeSitterGoRouteExtractor::ScopedConfig
- Struct
- Value
- Object
Overview
Chi-style extractor: walks the AST with a prefix stack so
r.Route("/api", func(r chi.Router) { r.Get("/users", h) })
resolves to /api/users. Handles arbitrarily-nested .Route blocks
plus .Group(func(r){ body }) (middleware group, no prefix change)
and r.With(mw).Get(...) middleware chains (the verb receiver is
any chain of .With(...) calls that bottoms out at an identifier).
skip_functions lets callers exclude function declarations whose
body is analysed separately — e.g. chi.cr's analyze_router_function
picks up adminRouter() under a Mount("/admin", adminRouter()),
so re-emitting the same routes from the free-floating function body
would duplicate them.
Config for the scope-aware walker. Chi and gf share the same
structural recognizer with different method names / extras.
Defined in:
miniparsers/go_route_extractor_ts.crConstructors
Instance Method Summary
- #bind_method_verb : String
- #bind_methods : Array(String)
- #chain_prefix? : Bool
- #middleware_method : String | Nil
- #prefix_method : String