Skip to content

Commit 1678113

Browse files
Okay, now I can make a release.
1 parent d106f8c commit 1678113

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/directive_provider.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
limitations under the License.
1717
]]
1818

19-
--#include "directives/define.lua"
19+
---#include "directives/define.lua"
2020
--#include "directives/include.lua"
2121
--#include "directives/loadmod.lua"

src/init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
limitations under the License.
1717
]]
1818

19+
--#include "luacomp_vars.lua"
1920
--#include "ast.lua"
2021
--#include "generator.lua"
2122
--#include "directive_provider.lua"
@@ -25,7 +26,7 @@ local argparse = (function()
2526
--#include "argparse.lua"
2627
end)()
2728

28-
local parser = argparse(arg[0], "A Lua preprocessor+postprocessor.")
29+
local parser = argparse(arg[0], "LuaComp v"..LUACOMP_VERSION.."\nA Lua preprocessor+postprocessor.")
2930
parser:argument("input", "Input file (- for STDIN)")
3031
parser:option("-O --output", "Output file. (- for STDOUT)", "-")
3132
parser:option("-m --minifier", "Sets the minifier", "none")
@@ -60,4 +61,4 @@ if (args.executable) then
6061
end
6162
of:write(rcode)
6263
of:close()
63-
f:close()
64+
f:close()

src/luacomp_vars.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
local function _sv(k, v)
2+
_G[k] = v
3+
--os.setenv(k, tostring(v))
4+
end
5+
6+
_sv("LUACOMP_V_MAJ", 1)
7+
_sv("LUACOMP_V_MIN", 0)
8+
_sv("LUACOMP_V_PAT", 0)
9+
_sv("LUACOMP_VERSION", LUACOMP_V_MAJ.."."..LUACOMP_V_MIN.."."..LUACOMP_V_PAT)
10+
_sv("LUACOMP_NAME", "LuaComp")

0 commit comments

Comments
 (0)