class
Analyzer::Scala::Akka
- Analyzer::Scala::Akka
- Analyzer::Scala::ScalaEngine
- Analyzer
- Reference
- Object
Defined in:
analyzer/analyzers/scala/akka.crConstant Summary
-
DIRECTIVE_ARGS_PATTERNS =
{"pathPrefix" => /(?<![.\w])pathPrefix\s*\(([^)]*)\)/, "path" => /(?<![.\w])path\s*\(([^)]*)\)/} -
Crystal recompiles an interpolated regex literal on every evaluation (a full PCRE2 JIT compile).
directive_argsruns twice per source line and the method matchers run once per HTTP verb per route, so precompile the fixed sets once at load time. -
HTTP_METHODS =
["get", "post", "put", "delete", "patch", "head", "options"] of ::String -
METHOD_BLOCK_PATTERNS =
HTTP_METHODS.to_h do |method| {method, /(?<![.\w])#{Regex.escape(method)}\s*\{/} end -
METHOD_SCOPE_PATTERNS =
HTTP_METHODS.to_h do |method| {method, /(?<![.\w])#{Regex.escape(method)}(?![\w])/} end -
PATH_DIRECTIVE_RE =
/(?<![.\w])path[A-Za-z]*/ -
Any path-matching directive (path/pathPrefix/pathEnd/pathSingleSlash/…), used to keep a leaf-method emission from firing on a line that already carries its own path directive.