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)
|
moon_loader = function(name)
|
||||||
local name_path = name:gsub("%.", dirsep)
|
local name_path = name:gsub("%.", dirsep)
|
||||||
local file, file_path
|
local file, file_path
|
||||||
local _list_0 = split(package.moonpath, ";")
|
for path in package.moonpath:gmatch("[^;]+") do
|
||||||
for _index_0 = 1, #_list_0 do
|
|
||||||
local path = _list_0[_index_0]
|
|
||||||
file_path = path:gsub("?", name_path)
|
file_path = path:gsub("?", name_path)
|
||||||
file = io.open(file_path)
|
file = io.open(file_path)
|
||||||
if file then
|
if file then
|
||||||
|
@ -38,7 +38,7 @@ moon_loader = (name) ->
|
|||||||
name_path = name\gsub "%.", dirsep
|
name_path = name\gsub "%.", dirsep
|
||||||
|
|
||||||
local file, file_path
|
local file, file_path
|
||||||
for path in *split package.moonpath, ";"
|
for path in package.moonpath\gmatch "[^;]+"
|
||||||
file_path = path\gsub "?", name_path
|
file_path = path\gsub "?", name_path
|
||||||
file = io.open file_path
|
file = io.open file_path
|
||||||
break if file
|
break if file
|
||||||
|
@ -406,6 +406,8 @@ class Block
|
|||||||
|
|
||||||
nil
|
nil
|
||||||
|
|
||||||
|
-- takes the existing set of lines and replaces them with the result of
|
||||||
|
-- calling fn on them
|
||||||
splice: (fn) =>
|
splice: (fn) =>
|
||||||
lines = {"lines", @_lines}
|
lines = {"lines", @_lines}
|
||||||
@_lines = Lines!
|
@_lines = Lines!
|
||||||
|
Loading…
Reference in New Issue
Block a user