]> git.saurik.com Git - cycript.git/commitdiff
Reimplement desugaring of let: function, not with.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 5 Jun 2012 10:21:41 +0000 (03:21 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 5 Jun 2012 10:21:41 +0000 (03:21 -0700)
Replace.cpp

index 9a2717147dc4bc2d6a99659d76ec46f30fa083b6..d9465832fb980eb4ebfe9ecff0d2348600beb9b8 100644 (file)
@@ -472,8 +472,7 @@ CYStatement *CYLabel::Replace(CYContext &context) {
 }
 
 CYStatement *CYLet::Replace(CYContext &context) {
-    declarations_->Replace(context);
-    return $ CYWith($ CYObject(declarations_->Property(context)), code_);
+    return $E($ CYCall($ CYFunctionExpression(NULL, declarations_->Parameter(context), code_), declarations_->Argument(context)));
 }
 
 void CYMember::Replace_(CYContext &context) {