From dfac155a3f8b650222fa784303e599f4e50abe67 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 28 Feb 2017 11:56:00 +0100 Subject: grammar --- src/lobject.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lobject.js') diff --git a/src/lobject.js b/src/lobject.js index 4974373..1a0df1c 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -333,7 +333,7 @@ const luaO_str2num = function(s) { let i = s2i[1]; if (e !== null) { /* try as an integer */ - return new TValue(CT.LUA_TNUMINT, i);; + return new TValue(CT.LUA_TNUMINT, i); } else { /* else try as a float */ s2i = l_str2d(s); e = s2i[0]; @@ -351,8 +351,8 @@ const luaO_str2num = function(s) { ** (eeeeexxx), where the real value is (1xxx) * 2^(eeeee - 1) if ** eeeee != 0 and (xxx) otherwise. */ -int luaO_int2fb (unsigned int x) { - int e = 0; /* exponent */ +const luaO_int2fb = function(x) { + let e = 0; /* exponent */ if (x < 8) return x; while (x >= (8 << 4)) { /* coarse steps */ x = (x + 0xf) >> 4; /* x = ceil(x / 16) */ @@ -363,7 +363,7 @@ int luaO_int2fb (unsigned int x) { e++; } return ((e+1) << 3) | (x - 8); -} +}; module.exports.CClosure = CClosure; module.exports.LClosure = LClosure; -- cgit v1.2.3-54-g00ecf