aboutsummaryrefslogtreecommitdiff
path: root/nomsu.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-24 16:43:06 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-24 16:43:56 -0700
commitb1c0446a3c65e8e22a9ecfd9d24213a2b9eac22b (patch)
treecfd6658dc826f6d8fc15e64d34bc3a2736b59fb0 /nomsu.lua
parent6014c5aa439d4b4ae0b97af64825371a86e78c2c (diff)
Updating file stuff for better compatibility with Lua 5.2 and fixing
some bugs. Also updated README to provide more compatibility info and list Lua5.2+ as a requirement.
Diffstat (limited to 'nomsu.lua')
-rw-r--r--nomsu.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/nomsu.lua b/nomsu.lua
index 8953e99..cfb243d 100644
--- a/nomsu.lua
+++ b/nomsu.lua
@@ -1,3 +1,8 @@
+local EXIT_SUCCESS, EXIT_FAILURE = 0, 1
+if _VERSION == "Lua 5.1" and not jit then
+ print("Sorry, Nomsu does not run on Lua 5.1. Please use LuaJIT 2+ or Lua 5.2+")
+ os.exit(EXIT_FAILURE)
+end
if NOMSU_VERSION and NOMSU_PREFIX then
local ver_bits
do
@@ -52,7 +57,6 @@ if NOMSU_VERSION and NOMSU_PREFIX then
else
package.nomsupath = "."
end
-local EXIT_SUCCESS, EXIT_FAILURE = 0, 1
local usage = [=[Nomsu Compiler
Usage: (nomsu | lua nomsu.lua | moon nomsu.moon) [-V version] [-O optimization level] [-v] [-c] [-s] [-t] [-I file] [--help | -h] [--version] [--no-core] [file [nomsu args...]]