Created
May 15, 2011 04:41
-
-
Save guileen/972892 to your computer and use it in GitHub Desktop.
stormjs demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_assign(_) { | |
var x = foo(_); | |
x.a = foo(x, _); | |
x.a.b = foo(x.a, _); | |
x['x']['y'] = foo(x.a, _); | |
( x || y)['x'] = foo(_); | |
} | |
// compile by stormjs ================> | |
function test_assign(cb) { | |
var _r1, x, _r5; | |
var count = 2; | |
function update() { | |
if (--count == 0) { | |
(x || y)["x"] = _r5; | |
} | |
} | |
foo(function(_err, __r1) { | |
if (_err) return cb(_err); | |
_r1 = __r1; | |
x = _r1; | |
foo(x, function(_err, _r2) { | |
if (_err) return cb(_err); | |
x.a = _r2; | |
foo(x.a, function(_err, _r3) { | |
if (_err) return cb(_err); | |
x.a.b = _r3; | |
}); | |
foo(x.a, function(_err, _r4) { | |
if (_err) return cb(_err); | |
x["x"]["y"] = _r4; | |
}); | |
}); | |
update(); | |
}); | |
foo(function(_err, __r5) { | |
if (_err) return cb(_err); | |
_r5 = __r5; | |
update(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment