diff options
Diffstat (limited to 'src/lua.js')
-rw-r--r-- | src/lua.js | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -11,6 +11,31 @@ const thread_status = { LUA_ERRERR: 6 }; +const constant_types = { + LUA_TNONE: -1, + LUA_TNIL: 0, + LUA_TBOOLEAN: 1, + LUA_TLIGHTUSERDATA: 2, + LUA_TNUMBER: 3, + LUA_TSTRING: 4, + LUA_TTABLE: 5, + LUA_TFUNCTION: 6, + LUA_TUSERDATA: 7, + LUA_TTHREAD: 8, + LUA_NUMTAGS: 9 +}; + +constant_types.LUA_TSHRSTR = constant_types.LUA_TSTRING | (0 << 4); /* short strings */ +constant_types.LUA_TLNGSTR = constant_types.LUA_TSTRING | (1 << 4); /* long strings */ + +constant_types.LUA_TNUMFLT = constant_types.LUA_TNUMBER | (0 << 4); /* float numbers */ +constant_types.LUA_TNUMINT = constant_types.LUA_TNUMBER | (1 << 4); /* integer numbers */ + +constant_types.LUA_TLCL = constant_types.LUA_TFUNCTION | (0 << 4); /* Lua closure */ +constant_types.LUA_TLCF = constant_types.LUA_TFUNCTION | (1 << 4); /* light C function */ +constant_types.LUA_TCCL = constant_types.LUA_TFUNCTION | (2 << 4); /* C closure */ + module.exports = { + constant_types: constant_types, thread_status: thread_status };
\ No newline at end of file |