Skip to content

Commit ef4157f

Browse files
committed
cleanup
1 parent bd93b32 commit ef4157f

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

moonscript/compile.lua

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ do
1717
ntype = _table_0.ntype
1818
end
1919
local concat, insert = table.concat, table.insert
20-
local pos_to_line, get_line, get_closest_line, trim = util.pos_to_line, util.get_line, util.get_closest_line, util.trim
20+
local pos_to_line, get_closest_line, trim = util.pos_to_line, util.get_closest_line, util.trim
2121
local mtype = util.moon.type
2222
local Line, Lines
2323
Lines = (function()
@@ -254,7 +254,6 @@ Line = (function()
254254
return _class_0
255255
end)()
256256
Block = (function()
257-
local block_iterator
258257
local _parent_0 = nil
259258
local _base_0 = {
260259
header = "do",
@@ -477,7 +476,6 @@ Block = (function()
477476
return
478477
end
479478
node = self.transform.statement(node)
480-
local before = #self._lines
481479
local result
482480
do
483481
local fn = line_compile[ntype(node)]
@@ -577,18 +575,6 @@ Block = (function()
577575
end
578576
})
579577
_base_0.__class = _class_0
580-
local self = _class_0
581-
block_iterator = function(list)
582-
return coroutine.wrap(function()
583-
local _list_0 = list
584-
for _index_0 = 1, #_list_0 do
585-
local item = _list_0[_index_0]
586-
if Block == mtype(item) then
587-
coroutine.yield(item)
588-
end
589-
end
590-
end)
591-
end
592578
if _parent_0 and _parent_0.__inherited then
593579
_parent_0.__inherited(_parent_0, _class_0)
594580
end

moonscript/compile.moon

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Set from require "moonscript.data"
1414
import ntype from require "moonscript.types"
1515

1616
import concat, insert from table
17-
import pos_to_line, get_line, get_closest_line, trim from util
17+
import pos_to_line, get_closest_line, trim from util
1818

1919
mtype = util.moon.type
2020

@@ -82,7 +82,6 @@ class Lines
8282
else
8383
t
8484

85-
-- copy with only array elements
8685
"Lines<#{util.dump(strip @)\sub 1, -2}>"
8786

8887
-- Buffer for building up a line
@@ -255,8 +254,6 @@ class Block
255254
buffer\add @header
256255
buffer\mark_pos @pos
257256

258-
-- print "Header:", util.dump(@header), mtype(@header).__name
259-
260257
if @next
261258
buffer\add @_lines
262259
@next\render buffer
@@ -312,19 +309,10 @@ class Block
312309
with Line!
313310
\append_list [@value v for v in *values], delim
314311

315-
316-
block_iterator = (list) ->
317-
coroutine.wrap ->
318-
for item in *list
319-
if Block == mtype item
320-
coroutine.yield item
321-
322312
stm: (node, ...) =>
323313
return if not node -- skip blank statements
324314
node = @transform.statement node
325315

326-
before = #@_lines
327-
328316
result = if fn = line_compile[ntype(node)]
329317
fn self, node, ...
330318
else

0 commit comments

Comments
 (0)