Skip to content

Commit a0e1a5a

Browse files
committed
[SourceMaps] Always increment line numbers when fragments have no base sexp
1 parent d885f24 commit a0e1a5a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/opal/source_map.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ def map
2424
:source_col => 0,
2525
:source => file
2626
)
27-
28-
new_lines = fragment.code.count "\n"
29-
line += new_lines
30-
column = 0
3127
end
28+
29+
30+
new_lines = fragment.code.count "\n"
31+
puts "[add] gen_line: #{line}, source_line: #{source_line} (adding: #{new_lines})"
32+
line += new_lines
33+
column = 0
3234
end
3335
end
3436
end

0 commit comments

Comments
 (0)