From 84dfcea32ad517400e970b7cf978246367ec9e46 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 May 2017 16:54:34 +1000 Subject: src/lstrlib.js: Add annotations for jshint --- src/lstrlib.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lstrlib.js b/src/lstrlib.js index eec086f..41c48ef 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -623,7 +623,7 @@ const str_pack = function(L) { totalsize += len + 1; break; } - case KOption.Kpadding: b.push(LUAL_PACKPADBYTE); + case KOption.Kpadding: b.push(LUAL_PACKPADBYTE); /* fall through */ case KOption.Kpaddalign: case KOption.Knop: arg--; /* undo increment */ break; @@ -705,6 +705,7 @@ const str_packsize = function(L) { case KOption.Kstring: /* strings with length count */ case KOption.Kzstr: /* zero-terminated string */ lauxlib.luaL_argerror(L, 1, lua.to_luastring("variable-length format", true)); + /* call never return, but to avoid warnings: *//* fall through */ default: break; } } @@ -1081,6 +1082,7 @@ const match = function(ms, s, p) { } case '+'.charCodeAt(0): /* 1 or more repetitions */ s++; /* 1 match already done */ + /* fall through */ case '*'.charCodeAt(0): /* 0 or more repetitions */ s = max_expand(ms, s, p, ep); break; -- cgit v1.2.3-54-g00ecf