class MrbParser::DebugInfoFile
Attributes
filename[RW]
line_ary[RW]
line_entry_count[RW]
line_flat_map[RW]
line_type[RW]
start_pos[RW]
Public Class Methods
new()
click to toggle source
# File lib/mrb_parser/debug_info_file.rb, line 11 def initialize end
Public Instance Methods
dump(n = 2)
click to toggle source
# File lib/mrb_parser/debug_info_file.rb, line 19 def dump(n = 2) printf_indent n, "*** DEBUG INFO FILE ***\n" printf_indent n, "start: %d\n", @start_pos printf_indent n, "fname: %s\n", @filename printf_indent n, "line type: %d (%s)\n", @line_type, MrbParser::DebugInfo::LINE_TYPE[@line_type] printf_indent n, "lines: %d\n", @line_entry_count case @line_type when MrbParser::DebugInfo::MRB_DEBUG_LINE_ARY @line_ary.each do |line| printf_indent n, " line: %d\n", line end when MrbParser::DebugInfo::MRB_DEBUG_LINE_FLAT_MAP @line_flat_map.each do |map| printf_indent n, " line: %d, start_pos: %d\n", map[:line], map[:start_pos] end end printf_indent n, "*** ***\n" end
printf_indent(n, *args)
click to toggle source
# File lib/mrb_parser/debug_info_file.rb, line 14 def printf_indent(n, *args) print " "*n printf *args end