@@ -27,13 +27,14 @@ local function macros_prefix(code, opts)
27
27
filename = _1_
28
28
end
29
29
end
30
- local _3_
31
- if filename then
32
- _3_ = (" \" " .. string.gsub (filename , " \\ " , " \\\\ " ) .. " \" " )
33
- else
34
- _3_ = " nil"
30
+ local function _3_ ()
31
+ if filename then
32
+ return (" \" " .. string.gsub (filename , " \\ " , " \\\\ " ) .. " \" " )
33
+ else
34
+ return " nil"
35
+ end
35
36
end
36
- return (" (local *file* " .. _3_ .. " )" .. " (require-macros \" " .. macros_module .. " \" )\n " .. (code or " " ))
37
+ return (" (local *file* " .. _3_ () .. " )" .. " (require-macros \" " .. macros_module .. " \" )\n " .. (code or " " ))
37
38
end
38
39
_2amodule_2a [" macros-prefix" ] = macros_prefix
39
40
local marker_prefix = " ANISEED_"
@@ -45,20 +46,20 @@ do end (_2amodule_locals_2a)["delete-marker-pat"] = delete_marker_pat
45
46
local function str (code , opts )
46
47
ANISEED_STATIC_MODULES = (true == a .get (opts , " static?" ))
47
48
local fnl = fennel .impl ()
48
- local function _5_ ()
49
+ local function _4_ ()
49
50
return string.gsub (string.gsub (fnl .compileString (macros_prefix (code , opts ), a [" merge!" ]({allowedGlobals = false , compilerEnv = _G }, opts )), (delete_marker_pat .. " \n " ), " \n " ), (delete_marker_pat .. " $" ), " " )
50
51
end
51
- return xpcall (_5_ , fnl .traceback )
52
+ return xpcall (_4_ , fnl .traceback )
52
53
end
53
54
_2amodule_2a [" str" ] = str
54
55
local function file (src , dest , opts )
55
56
local code = a .slurp (src )
56
- local _6_ , _7_ = str (code , a [" merge!" ]({filename = src , [" static?" ] = true }, opts ))
57
- if ((_6_ == false ) and (nil ~= _7_ )) then
58
- local err = _7_
57
+ local _5_ , _6_ = str (code , a [" merge!" ]({filename = src , [" static?" ] = true }, opts ))
58
+ if ((_5_ == false ) and (nil ~= _6_ )) then
59
+ local err = _6_
59
60
return nvim .err_writeln (err )
60
- elseif ((_6_ == true ) and (nil ~= _7_ )) then
61
- local result = _7_
61
+ elseif ((_5_ == true ) and (nil ~= _6_ )) then
62
+ local result = _6_
62
63
fs .mkdirp (fs .basename (dest ))
63
64
return a .spit (dest , result )
64
65
else
0 commit comments