mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
misc
This commit is contained in:
parent
326e4208cb
commit
9dbc1d5062
@ -66,9 +66,7 @@ end
|
||||
moon_loader = function(name)
|
||||
local name_path = name:gsub("%.", dirsep)
|
||||
local file, file_path
|
||||
local _list_0 = split(package.moonpath, ";")
|
||||
for _index_0 = 1, #_list_0 do
|
||||
local path = _list_0[_index_0]
|
||||
for path in package.moonpath:gmatch("[^;]+") do
|
||||
file_path = path:gsub("?", name_path)
|
||||
file = io.open(file_path)
|
||||
if file then
|
||||
|
@ -38,7 +38,7 @@ moon_loader = (name) ->
|
||||
name_path = name\gsub "%.", dirsep
|
||||
|
||||
local file, file_path
|
||||
for path in *split package.moonpath, ";"
|
||||
for path in package.moonpath\gmatch "[^;]+"
|
||||
file_path = path\gsub "?", name_path
|
||||
file = io.open file_path
|
||||
break if file
|
||||
|
@ -406,6 +406,8 @@ class Block
|
||||
|
||||
nil
|
||||
|
||||
-- takes the existing set of lines and replaces them with the result of
|
||||
-- calling fn on them
|
||||
splice: (fn) =>
|
||||
lines = {"lines", @_lines}
|
||||
@_lines = Lines!
|
||||
|
Loading…
Reference in New Issue
Block a user