summaryrefslogtreecommitdiff
path: root/www/js/imachine.js
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-08-22 11:31:54 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-08-22 11:31:54 -0400
commit6f96b4f9b19e54fba9e392347959e0e1ee68d876 (patch)
tree9d98b4fce255086fdf6caada260170802ec43809 /www/js/imachine.js
parente526f3df818ea21760c5eeb4e2f728845bb93140 (diff)
downloadhtml5ks-6f96b4f9b19e54fba9e392347959e0e1ee68d876.tar.xz
html5ks-6f96b4f9b19e54fba9e392347959e0e1ee68d876.zip
jshint
Diffstat (limited to 'www/js/imachine.js')
-rw-r--r--www/js/imachine.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/www/js/imachine.js b/www/js/imachine.js
index 5e21ac6..5e8423c 100644
--- a/www/js/imachine.js
+++ b/www/js/imachine.js
@@ -53,13 +53,14 @@ html5ks.imachine = (function () {
break;
case "if":
var cpy = inst.slice(0),
- type = '';
+ type = '',
+ next = null;
el: while (type = cpy.shift()) {
switch (type) {
case "if":
case "elif":
- var cond = cpy.shift(),
- next = cpy.shift();
+ var cond = cpy.shift();
+ next = cpy.shift();
switch (cond[0]) {
case "_return":
if (this._return == cond[1]) {
@@ -77,6 +78,7 @@ html5ks.imachine = (function () {
if (html5ks.store.attraction[cond[0]] > cond[1]) {
break el;
}
+ break;
default:
throw new Error("unhandled if statement");
}
@@ -87,7 +89,6 @@ html5ks.imachine = (function () {
}
}
return html5ks.imachine.run(next).then(runInst);
- break;
case "path_end":
// TODO: disp vid + add to persistent
deferred.resolve();