diff options
Diffstat (limited to 'src/cratera/init.lua')
-rw-r--r-- | src/cratera/init.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cratera/init.lua b/src/cratera/init.lua index bac3f53..a354d56 100644 --- a/src/cratera/init.lua +++ b/src/cratera/init.lua @@ -16,13 +16,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. --]] --- This code is highly experimental and not very good - local parser = require "cratera.parser" local luatokens = require "cratera.luatokens" local compiler = require "cratera.compiler" -local LUA_SIGNATURE = string.dump(function() end):sub(1,1) +local LUA_SIGNATURE +if string.dump then + LUA_SIGNATURE = string.dump(function() end):sub(1,1) +else + LUA_SIGNATURE = string.char(27) +end local function cratera_load(reader, ...) if type(reader) == "string" and reader:sub(1,1) == LUA_SIGNATURE then |