summaryrefslogtreecommitdiff
path: root/src/lcode.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-28 11:56:00 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-28 15:49:13 +0100
commitdfac155a3f8b650222fa784303e599f4e50abe67 (patch)
treee6eb2b1040e79991fbd2d6b4ff0a92ededc36275 /src/lcode.js
parent8d576081a53ee1a866491b423c5373951aa6a7c4 (diff)
downloadfengari-dfac155a3f8b650222fa784303e599f4e50abe67.tar.gz
fengari-dfac155a3f8b650222fa784303e599f4e50abe67.tar.bz2
fengari-dfac155a3f8b650222fa784303e599f4e50abe67.zip
grammar
Diffstat (limited to 'src/lcode.js')
-rw-r--r--src/lcode.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lcode.js b/src/lcode.js
index 9a5cda0..a2dc43b 100644
--- a/src/lcode.js
+++ b/src/lcode.js
@@ -46,6 +46,10 @@ const UnOpr = {
OPR_NOUNOPR: 4
};
+const getinstruction = function(fs, e) {
+ return fs.f.code[e.u.info];
+};
+
/*
** Gets the destination address of a jump instruction. Used to traverse
** a list of jumps.
@@ -249,6 +253,7 @@ const luaK_codeAsBx = function(fs,o,A,sBx) {
module.exports.BinOpr = BinOpr;
module.exports.NO_JUMP = NO_JUMP;
module.exports.UnOpr = UnOpr;
+module.exports.getinstruction = getinstruction;
module.exports.luaK_codeABC = luaK_codeABC;
module.exports.luaK_codeABx = luaK_codeABx;
module.exports.luaK_codeAsBx = luaK_codeAsBx;