X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/534fb6da44730df33f71e88b7a14253eb8212eb7..6f926cee9d6b259845cd91069cb7c6f488d1eed6:/Output.cpp diff --git a/Output.cpp b/Output.cpp index 7580288..a5d9743 100644 --- a/Output.cpp +++ b/Output.cpp @@ -360,14 +360,8 @@ void CYFor::Output(std::ostream &out) const { } void CYForEachIn::Output(std::ostream &out) const { - const char *name(initialiser_->ForEachIn()); + out << "with({$cys:0,$cyt:0}){"; - if (name != NULL) { - out << '{'; - out << "var " << name << ';'; - } - - out << "(function($cys,$cyt){"; out << "$cys="; set_->Output(out, CYPA, CYNoFlags); out << ";"; @@ -379,10 +373,9 @@ void CYForEachIn::Output(std::ostream &out) const { code_->Show(out); - out << "}}());"; + out << '}'; - if (name != NULL) - out << '}'; + out << '}'; } void CYForEachInComprehension::Begin_(std::ostream &out) const {