mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
Fixed lua/moon line mapping
This commit is contained in:
parent
da1bc6f8ec
commit
437be6efb5
@ -61,6 +61,9 @@ do
|
||||
local _exp_0 = mtype(l)
|
||||
if "string" == _exp_0 or DelayedLine == _exp_0 then
|
||||
line_no = line_no + 1
|
||||
for _ in l:gmatch("\n") do
|
||||
line_no = line_no + 1
|
||||
end
|
||||
out[line_no] = posmap[i]
|
||||
elseif Lines == _exp_0 then
|
||||
local _
|
||||
|
@ -44,6 +44,7 @@ class Lines
|
||||
switch mtype l
|
||||
when "string", DelayedLine
|
||||
line_no += 1
|
||||
line_no += 1 for _ in l\gmatch"\n"
|
||||
out[line_no] = posmap[i]
|
||||
when Lines
|
||||
_, line_no = l\flatten_posmap line_no, out
|
||||
|
Loading…
Reference in New Issue
Block a user