aboutsummaryrefslogtreecommitdiff
path: root/src/lua.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-16 21:29:06 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-16 21:52:32 +0100
commitbe0757bcfc96dc6146d72e9536fa8e32d9a3dec7 (patch)
tree2c2b67ccef73149166cac94b908f92115c3b0b9f /src/lua.js
parent62cb8279094fd137ce2382fe99592ef0aae0f557 (diff)
downloadfengari-be0757bcfc96dc6146d72e9536fa8e32d9a3dec7.tar.gz
fengari-be0757bcfc96dc6146d72e9536fa8e32d9a3dec7.tar.bz2
fengari-be0757bcfc96dc6146d72e9536fa8e32d9a3dec7.zip
lua_pop, lua_settop, js closure
Diffstat (limited to 'src/lua.js')
-rw-r--r--src/lua.js36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/lua.js b/src/lua.js
index 4534f78..245c826 100644
--- a/src/lua.js
+++ b/src/lua.js
@@ -73,42 +73,6 @@ const print_version = function() {
console.log(FENGARI_COPYRIGHT);
};
-
-const handle_script = function(L, args) {
- // TODO: stdin
-
-};
-
-const handle_luainit = function(L) {
- // TODO: Should execute script in LUA_INIT_5_3
- return thread_status.LUA_OK;
-};
-
-/*
-** Main body of stand-alone interpreter (to be called in protected mode).
-** Reads the options and handles them all.
-*/
-const pmain = function(L) {
- // arguments are a userdata wrapping a plain JS object
- let args = L.stack[1].value; // For now it should only hold a DataView containing bytecode
-
- // TODO: luaL_checkversion(L);
- // TODO: LUA_NOENV
- // TODO: luaL_openlibs(L);
- // TODO: createargtable(L, argv, argc, script);
-
- if (!args.E) {
- if (handle_luainit(L) != thread_status.LUA_OK)
- return 0; /* error running LUA_INIT */
- }
-
- // TODO: runargs(L, argv, script)
- if (args.script && handle_script(L, args) != thread_status.LUA_OK)
- return 0;
-
- // TODO: doREPL(L);
-};
-
module.exports.constant_types = constant_types;
module.exports.thread_status = thread_status;
module.exports.LUA_MULTRET = -1;