aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 16:54:34 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 16:54:34 +1000
commit84dfcea32ad517400e970b7cf978246367ec9e46 (patch)
treedd6c7f8687b8652cb346b09980d9346a22deb0a2
parentb84b8362abf0ae9359339b549563e556ff857458 (diff)
downloadfengari-84dfcea32ad517400e970b7cf978246367ec9e46.tar.gz
fengari-84dfcea32ad517400e970b7cf978246367ec9e46.tar.bz2
fengari-84dfcea32ad517400e970b7cf978246367ec9e46.zip
src/lstrlib.js: Add annotations for jshint
-rw-r--r--src/lstrlib.js4
1 files changed, 3 insertions, 1 deletions
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;