From dfac155a3f8b650222fa784303e599f4e50abe67 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 28 Feb 2017 11:56:00 +0100 Subject: grammar --- src/lcode.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lcode.js') 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; -- cgit v1.2.3-54-g00ecf