summary refs log tree commit diff stats
path: root/src/cratera.cratera.d/lib.cratera
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2024-06-04 23:48:59 -0300
committerSoniEx2 <endermoneymod@gmail.com>2024-06-04 23:48:59 -0300
commitdba1285ca98d7a325f05b77b805089b3edd61867 (patch)
treef5ddfbd1c86a7db464dc1c459c38c5e256e49089 /src/cratera.cratera.d/lib.cratera
parent5eecbd6ef771a54b455d96f4033212062d7c3f8f (diff)
Implement cratera REPL
Diffstat (limited to 'src/cratera.cratera.d/lib.cratera')
-rw-r--r--src/cratera.cratera.d/lib.cratera9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cratera.cratera.d/lib.cratera b/src/cratera.cratera.d/lib.cratera
index 701de31..6e1627e 100644
--- a/src/cratera.cratera.d/lib.cratera
+++ b/src/cratera.cratera.d/lib.cratera
@@ -19,7 +19,7 @@
 local cratera_env = _G
 local cratera_loader_base = cratera_env.load
 
--- only use setfenv if load doesn't support env argument
+-- only use setfenv if lua load doesn't support env argument
 local setfenv = (lua.loadstring or lua.load)("return setfenv", nil, nil, {})()
 
 function cratera_env.load(chunk, chunkname, mode, env)
@@ -38,3 +38,10 @@ function cratera_env.load(chunk, chunkname, mode, env)
     end
 end
 
+-- cratera opts not to support dostring/dofile.
+if lua.dostring then
+    cratera_env.dostring = false
+end
+if lua.dofile then
+    cratera_env.dofile = false
+end