Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correctly print defined line specially

  • Loading branch information...
commit f4e70aabcaa608a5ecccf32db9090322becb8824 1 parent b1c41b9
@ryoqun ryoqun authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/compiler/printers.rb
View
8 lib/compiler/printers.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.