From 00a0649ca3c378bb7e4910571207617f7852c420 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 May 2017 15:45:07 +1000 Subject: Fix some jshint warnings --- src/lapi.js | 2 +- src/lfunc.js | 2 +- src/loadlib.js | 2 +- src/lparser.js | 1 - src/lutf8lib.js | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lapi.js b/src/lapi.js index f326198..d992b0b 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -255,7 +255,7 @@ const lua_pushstring = function (L, s) { assert(Array.isArray(s) || s === undefined || s === null, "lua_pushstring expects array of byte"); if (s === undefined || s === null) { - L.stack[L.top] = new TValue(CT.LUA_TNIL, null) + L.stack[L.top] = new TValue(CT.LUA_TNIL, null); L.top++; } else { let ts = lstring.luaS_new(L, s); diff --git a/src/lfunc.js b/src/lfunc.js index b4684e1..7bf4769 100644 --- a/src/lfunc.js +++ b/src/lfunc.js @@ -120,7 +120,7 @@ const luaF_getlocalname = function(f, local_number, pc) { module.exports.MAXUPVAL = 255; module.exports.Proto = Proto; module.exports.UpVal = UpVal; -module.exports.luaF_findupval = luaF_findupval; +module.exports.luaF_findupval = luaF_findupval; module.exports.luaF_close = luaF_close; module.exports.luaF_getlocalname = luaF_getlocalname; module.exports.luaF_initupvals = luaF_initupvals; diff --git a/src/loadlib.js b/src/loadlib.js index 4e5ee60..81706e5 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -374,7 +374,7 @@ const ll_require_cont = function(L, status, ctx) { let name = ctx; lua.lua_pushstring(L, name); /* pass name as argument to module loader */ lua.lua_insert(L, -2); /* name is 1st argument (before search data) */ - lua.lua_callk(L, 2, 1, ctx, ll_require_cont2) + lua.lua_callk(L, 2, 1, ctx, ll_require_cont2); return ll_require_cont2(L, lua.LUA_OK, ctx); /* run loader to load module */ }; diff --git a/src/lparser.js b/src/lparser.js index cea2ea3..2dd9c7d 100644 --- a/src/lparser.js +++ b/src/lparser.js @@ -16,7 +16,6 @@ const BinOpr = lcode.BinOpr; const OpCodesI = lopcodes.OpCodesI; const Proto = lfunc.Proto; const R = llex.RESERVED; -const TValue = lobject.TValue; const UnOpr = lcode.UnOpr; const char = defs.char; diff --git a/src/lutf8lib.js b/src/lutf8lib.js index 1a401c4..de97bec 100644 --- a/src/lutf8lib.js +++ b/src/lutf8lib.js @@ -21,7 +21,7 @@ const u_posrelat = function(pos, len) { /* ** Decode one UTF-8 sequence, returning NULL if byte sequence is invalid. */ -const utf8_decode = function(s, val) { +const utf8_decode = function(s) { let limits = [0xFF, 0x7F, 0x7FF, 0xFFFF]; let c = s[0]; let res = 0; /* final result */ -- cgit v1.2.3-70-g09d2