diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-22 11:31:54 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-22 11:31:54 -0400 |
commit | 6f96b4f9b19e54fba9e392347959e0e1ee68d876 (patch) | |
tree | 9d98b4fce255086fdf6caada260170802ec43809 /www/js/imachine.js | |
parent | e526f3df818ea21760c5eeb4e2f728845bb93140 (diff) | |
download | html5ks-6f96b4f9b19e54fba9e392347959e0e1ee68d876.tar.xz html5ks-6f96b4f9b19e54fba9e392347959e0e1ee68d876.zip |
jshint
Diffstat (limited to 'www/js/imachine.js')
-rw-r--r-- | www/js/imachine.js | 9 |
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(); |