diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2024-05-29 23:00:53 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2024-05-29 23:00:53 -0300 |
commit | 5eecbd6ef771a54b455d96f4033212062d7c3f8f (patch) | |
tree | 9fef3d210df849e82baa763b8b2b885c4806ca96 /src/cratera/init.lua | |
parent | bbb9f04eecc66a9e8e208cc4abc0466697807765 (diff) |
Implement cratera bootstrap
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 |