mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
create two entries in posmap for multi-line lines
This commit is contained in:
parent
db8f5398fc
commit
3b81b84a9a
@ -61,6 +61,7 @@ do
|
|||||||
local _exp_0 = mtype(l)
|
local _exp_0 = mtype(l)
|
||||||
if "string" == _exp_0 or DelayedLine == _exp_0 then
|
if "string" == _exp_0 or DelayedLine == _exp_0 then
|
||||||
line_no = line_no + 1
|
line_no = line_no + 1
|
||||||
|
out[line_no] = posmap[i]
|
||||||
for _ in l:gmatch("\n") do
|
for _ in l:gmatch("\n") do
|
||||||
line_no = line_no + 1
|
line_no = line_no + 1
|
||||||
end
|
end
|
||||||
|
@ -44,6 +44,8 @@ class Lines
|
|||||||
switch mtype l
|
switch mtype l
|
||||||
when "string", DelayedLine
|
when "string", DelayedLine
|
||||||
line_no += 1
|
line_no += 1
|
||||||
|
out[line_no] = posmap[i]
|
||||||
|
|
||||||
line_no += 1 for _ in l\gmatch"\n"
|
line_no += 1 for _ in l\gmatch"\n"
|
||||||
out[line_no] = posmap[i]
|
out[line_no] = posmap[i]
|
||||||
when Lines
|
when Lines
|
||||||
|
Loading…
Reference in New Issue
Block a user