X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b3378a02d0a811be38e530933fb9a57a3012a823..dbe05dacd3d0cd9a418bee5a696b7b4b2f55f925:/ObjectiveC/Replace.cpp diff --git a/ObjectiveC/Replace.cpp b/ObjectiveC/Replace.cpp index 35389b9..748fc6f 100644 --- a/ObjectiveC/Replace.cpp +++ b/ObjectiveC/Replace.cpp @@ -104,6 +104,10 @@ CYSelectorPart *CYMessageParameter::SelectorPart(CYContext &context) const { $T( return tag_ == NULL ? next : $ CYSelectorPart(tag_, name_ != NULL, next); } +CYExpression *CYBox::Replace(CYContext &context) { + return $C1($M($V("Instance"), $S("box")), value_); +} + CYStatement *CYProtocol::Replace(CYContext &context) const { $T(NULL) return $ CYBlock($$->* next_->Replace(context)->* @@ -119,7 +123,7 @@ CYExpression *CYSelector::Replace(CYContext &context) { CYString *CYSelectorPart::Replace(CYContext &context) { std::ostringstream str; - for (const CYSelectorPart *part(this); part != NULL; part = part->next_) { + CYForEach (part, this) { if (part->name_ != NULL) str << part->name_->Word(); if (part->value_) @@ -154,5 +158,5 @@ CYExpression *CYSendDirect::Replace(CYContext &context) { } CYExpression *CYSendSuper::Replace(CYContext &context) { - return $ CYSendDirect($V("cyr"), arguments_); + return $ CYSendDirect($V("$cyr"), arguments_); }