ElixirScope.ASTRepository.Parser (elixir_scope v0.0.1)
Enhanced AST parser that assigns unique node IDs to instrumentable AST nodes, extracts instrumentation points, and builds correlation indexes for runtime correlation.
This module is the foundation for compile-time AST analysis with runtime correlation.
Summary
Functions
Assigns unique node IDs to instrumentable AST nodes.
Builds a correlation index from enhanced AST and instrumentation points.
Extracts instrumentation points from an enhanced AST.
Functions
Assigns unique node IDs to instrumentable AST nodes.
Instrumentable nodes include:
- Function definitions (def, defp)
- Pipe operations (|>)
- Case statements
- Try-catch blocks
- Module attributes
Returns {:ok, enhanced_ast} or {:error, reason}.
Builds a correlation index from enhanced AST and instrumentation points.
Returns {:ok, correlation_index} where correlation_index is a map of correlation_id -> ast_node_id.
Extracts instrumentation points from an enhanced AST.
Returns {:ok, instrumentation_points} or {:error, reason}.