projects
/
cycript.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5192746
)
Preserve declaration initialisers replacing for-each.
author
Jay Freeman (saurik)
<saurik@saurik.com>
Tue, 5 Jun 2012 12:07:55 +0000
(
05:07
-0700)
committer
Jay Freeman (saurik)
<saurik@saurik.com>
Tue, 5 Jun 2012 12:07:55 +0000
(
05:07
-0700)
Replace.cpp
patch
|
blob
|
blame
|
history
diff --git
a/Replace.cpp
b/Replace.cpp
index d508db0e252b2dd15aea7a9f6c13ce781968cdfd..5be4e01b718f413f6f9bae136a6cdcb3e6e4ed35 100644
(file)
--- a/
Replace.cpp
+++ b/
Replace.cpp
@@
-357,6
+357,12
@@
CYStatement *CYForInComprehension::Replace(CYContext &context, CYStatement *stat
}
CYStatement *CYForEachIn::Replace(CYContext &context) {
+ if (CYAssignment *assignment = initialiser_->Assignment(context))
+ return $ CYBlock($$->*
+ $E(assignment)->*
+ this
+ );
+
CYIdentifier *cys($I("$cys")), *cyt($I("$cyt"));
return $ CYLet($L2($L(cys, set_), $L(cyt)), $$->*