Ragex.Analyzers.Behaviour behaviour
(Ragex v0.12.0)
View Source
Defines the behaviour for language-specific code analyzers.
Each analyzer must implement these callbacks to extract code structure and metadata from source files in their respective languages.
Summary
Callbacks
Analyzes source code and extracts structure information.
Returns the file extensions supported by this analyzer.
Types
@type analysis_result() :: %{ modules: [module_info()], functions: [function_info()], calls: [call_info()], imports: [import_info()] }
Callbacks
@callback analyze(source :: String.t(), file_path :: String.t()) :: {:ok, analysis_result()} | {:error, term()}
Analyzes source code and extracts structure information.
Returns an analysis result containing modules, functions, calls, and imports.
@callback supported_extensions() :: [String.t()]
Returns the file extensions supported by this analyzer.