Skip to content

Commit

Permalink
Correctly print defined line specially
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed May 17, 2012
1 parent b1c41b9 commit f4e70aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/compiler/printers.rb
Expand Up @@ -63,10 +63,16 @@ def print_footer
end

def print_lines(cm)
print "Lines to IP: "
lines = cm.lines
size = lines.size - 1
i = 1

if lines[0] == -1
puts "Line: #{lines[1]}"
i += 2
end

print "Lines to IP: "
while i < size
print "#{lines[i]}: #{lines[i - 1]}..#{lines[i + 1] - 1}"
i += 2
Expand Down

0 comments on commit f4e70aa

Please sign in to comment.