summaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-11 10:06:09 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-11 10:45:32 +0200
commit4d374d77766b6f621f2194a9546521295aa528af (patch)
tree0391532304b34c87e36a85a5ea13b24d1d42fe11 /src/lauxlib.js
parentbb51e9d6e41efe08f6f053599bf31245ab116b77 (diff)
downloadfengari-4d374d77766b6f621f2194a9546521295aa528af.tar.gz
fengari-4d374d77766b6f621f2194a9546521295aa528af.tar.bz2
fengari-4d374d77766b6f621f2194a9546521295aa528af.zip
debug.debug
Use readline-sync to read from stdin interactively
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js82
1 files changed, 44 insertions, 38 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index 5a13379..03ca210 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -545,41 +545,47 @@ if (typeof require === "function") {
}
}
-module.exports.LUA_LOADED_TABLE = LUA_LOADED_TABLE;
-module.exports.luaL_Buffer = luaL_Buffer;
-module.exports.luaL_addchar = luaL_addchar;
-module.exports.luaL_addlstring = luaL_addlstring;
-module.exports.luaL_addstring = luaL_addstring;
-module.exports.luaL_addvalue = luaL_addvalue;
-module.exports.luaL_argcheck = luaL_argcheck;
-module.exports.luaL_argerror = luaL_argerror;
-module.exports.luaL_buffinit = luaL_buffinit;
-module.exports.luaL_buffinitsize = luaL_buffinitsize;
-module.exports.luaL_callmeta = luaL_callmeta;
-module.exports.luaL_checkany = luaL_checkany;
-module.exports.luaL_checkinteger = luaL_checkinteger;
-module.exports.luaL_checklstring = luaL_checklstring;
-module.exports.luaL_checknumber = luaL_checknumber;
-module.exports.luaL_checkstack = luaL_checkstack;
-module.exports.luaL_checkstring = luaL_checkstring;
-module.exports.luaL_checktype = luaL_checktype;
-module.exports.luaL_error = luaL_error;
-module.exports.luaL_getmetafield = luaL_getmetafield;
-module.exports.luaL_getsubtable = luaL_getsubtable;
-module.exports.luaL_len = luaL_len;
-module.exports.luaL_loadbuffer = luaL_loadbuffer;
-module.exports.luaL_loadbufferx = luaL_loadbufferx;
-module.exports.luaL_loadstring = luaL_loadstring;
-module.exports.luaL_newlib = luaL_newlib;
-module.exports.luaL_newstate = luaL_newstate;
-module.exports.luaL_opt = luaL_opt;
-module.exports.luaL_optinteger = luaL_optinteger;
-module.exports.luaL_optlstring = luaL_optlstring;
-module.exports.luaL_optstring = luaL_optstring;
-module.exports.luaL_prepbuffsize = luaL_prepbuffsize;
-module.exports.luaL_pushresult = luaL_pushresult;
-module.exports.luaL_requiref = luaL_requiref;
-module.exports.luaL_setfuncs = luaL_setfuncs;
-module.exports.luaL_tolstring = luaL_tolstring;
-module.exports.luaL_typename = luaL_typename;
-module.exports.luaL_where = luaL_where;
+const lua_writestringerror = function(s) {
+ if (process.stderr) process.stderr.write(s);
+ else console.error(s);
+};
+
+module.exports.LUA_LOADED_TABLE = LUA_LOADED_TABLE;
+module.exports.luaL_Buffer = luaL_Buffer;
+module.exports.luaL_addchar = luaL_addchar;
+module.exports.luaL_addlstring = luaL_addlstring;
+module.exports.luaL_addstring = luaL_addstring;
+module.exports.luaL_addvalue = luaL_addvalue;
+module.exports.luaL_argcheck = luaL_argcheck;
+module.exports.luaL_argerror = luaL_argerror;
+module.exports.luaL_buffinit = luaL_buffinit;
+module.exports.luaL_buffinitsize = luaL_buffinitsize;
+module.exports.luaL_callmeta = luaL_callmeta;
+module.exports.luaL_checkany = luaL_checkany;
+module.exports.luaL_checkinteger = luaL_checkinteger;
+module.exports.luaL_checklstring = luaL_checklstring;
+module.exports.luaL_checknumber = luaL_checknumber;
+module.exports.luaL_checkstack = luaL_checkstack;
+module.exports.luaL_checkstring = luaL_checkstring;
+module.exports.luaL_checktype = luaL_checktype;
+module.exports.luaL_error = luaL_error;
+module.exports.luaL_getmetafield = luaL_getmetafield;
+module.exports.luaL_getsubtable = luaL_getsubtable;
+module.exports.luaL_len = luaL_len;
+module.exports.luaL_loadbuffer = luaL_loadbuffer;
+module.exports.luaL_loadbufferx = luaL_loadbufferx;
+module.exports.luaL_loadstring = luaL_loadstring;
+module.exports.luaL_newlib = luaL_newlib;
+module.exports.luaL_newstate = luaL_newstate;
+module.exports.luaL_opt = luaL_opt;
+module.exports.luaL_optinteger = luaL_optinteger;
+module.exports.luaL_optlstring = luaL_optlstring;
+module.exports.luaL_optstring = luaL_optstring;
+module.exports.luaL_prepbuffsize = luaL_prepbuffsize;
+module.exports.luaL_pushresult = luaL_pushresult;
+module.exports.luaL_requiref = luaL_requiref;
+module.exports.luaL_setfuncs = luaL_setfuncs;
+module.exports.luaL_tolstring = luaL_tolstring;
+module.exports.luaL_typename = luaL_typename;
+module.exports.luaL_where = luaL_where;
+module.exports.lua_writestringerror = lua_writestringerror;