aboutsummaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-02 07:36:14 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-02 07:36:14 +0100
commitfa7ce109418aca2fd60fdb65b4b2451c4854dd09 (patch)
treec6469ea5d437374a7db0980422a18c32d9a6fb61 /src/lstate.js
parentebeb32400b9a2d3e7196887f7021b9bf08770fd9 (diff)
downloadfengari-fa7ce109418aca2fd60fdb65b4b2451c4854dd09.tar.gz
fengari-fa7ce109418aca2fd60fdb65b4b2451c4854dd09.tar.bz2
fengari-fa7ce109418aca2fd60fdb65b4b2451c4854dd09.zip
Following Lua's source code as closely as possible
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lstate.js b/src/lstate.js
new file mode 100644
index 0000000..b0002c3
--- /dev/null
+++ b/src/lstate.js
@@ -0,0 +1,36 @@
+/*jshint esversion: 6 */
+"use strict";
+
+class lua_State {
+
+ constructor() {
+ // CommonHeader;
+ // unsigned short nci; /* number of items in 'ci' list */
+ // lu_byte status;
+ // StkId top; /* first free slot in the stack */
+ // global_State *l_G;
+ // CallInfo *ci; /* call info for current function */
+ // const Instruction *oldpc; /* last pc traced */
+ // StkId stack_last; /* last free slot in the stack */
+ // StkId stack; /* stack base */
+ // UpVal *openupval; /* list of open upvalues in this stack */
+ // GCObject *gclist;
+ // struct lua_State *twups; list of threads with open upvalues
+ // struct lua_longjmp *errorJmp; /* current error recover point */
+ // CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
+ // volatile lua_Hook hook;
+ // ptrdiff_t errfunc; /* current error handling function (stack index) */
+ // int stacksize;
+ // int basehookcount;
+ // int hookcount;
+ // unsigned short nny; /* number of non-yieldable calls in stack */
+ // unsigned short nCcalls; /* number of nested C calls */
+ // l_signalT hookmask;
+ // lu_byte allowhook;
+ }
+
+}
+
+module.exports = {
+ lua_State: lua_State
+}; \ No newline at end of file