Permalink
Browse files

Correctly print defined line specially

  • Loading branch information...
1 parent b1c41b9 commit f4e70aabcaa608a5ecccf32db9090322becb8824 @ryoqun ryoqun committed May 17, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/compiler/printers.rb
View
@@ -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

0 comments on commit f4e70aa

Please sign in to comment.