Module: Prism::Merge::DebugLogger

Extended by:
Ast::Merge::DebugLogger
Defined in:
lib/prism/merge/debug_logger.rb

Overview

Debug logging utility for Prism::Merge.
Extends the base Ast::Merge::DebugLogger with Prism-specific configuration.

Examples:

Enable debug logging

ENV['PRISM_MERGE_DEBUG'] = '1'
DebugLogger.debug("Processing node", {type: "mapping", line: 5})

Disable debug logging (default)

DebugLogger.debug("This won't be printed", {})

Class Method Summary collapse

Class Method Details

.extract_node_info(node) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/prism/merge/debug_logger.rb', line 26

def extract_node_info(node)
  if node.is_a?(Prism::Merge::FreezeNode)
    return {type: "FreezeNode", lines: "#{node.start_line}..#{node.end_line}"}
  end

  # Delegate to base implementation for other node types
  Ast::Merge::DebugLogger.extract_node_info(node)
end