return $E(Replace_(context));
}
-CYExpression *CYEncodedType::Replace(CYContext &context) {
- return type_->Replace(context);
-}
-
CYStatement *CYField::Replace(CYContext &context) const { $T(NULL)
CYVariable *cyn($V("$cyn"));
CYVariable *cyt($V("$cyt"));
}
CYStatement *CYImport::Replace(CYContext &context) {
- return this;
+ return $ CYVar($L1($L(module_->part_->Word(), $C1($V("require"), module_->Replace(context, "/")))));
}
CYStatement *CYMessage::Replace(CYContext &context, bool replace) const { $T(NULL)
return MessageType(context, type_, next_);
}
+CYString *CYModule::Replace(CYContext &context, const char *separator) const {
+ if (next_ == NULL)
+ return $ CYString(part_);
+ return $ CYString($pool.strcat(next_->Replace(context, separator)->Value(), separator, part_->Word(), NULL));
+}
+
CYExpression *CYBox::Replace(CYContext &context) {
return $C1($M($V("Instance"), $S("box")), value_);
}
CYExpression *CYObjCBlock::Replace(CYContext &context) {
- return $N2($V("Functor"), $ CYFunctionExpression(NULL, $ CYFunctionParameter($ CYDeclaration($ CYIdentifier("$cyt")), parameters_->Parameters(context)), statements_), parameters_->TypeSignature(context, $ CYAdd(type_->Replace(context), $ CYString("@"))));
+ return $C1($ CYEncodedType(($ CYTypedIdentifier(*typed_))->Modify($ CYTypeBlockWith(parameters_))), $ CYFunctionExpression(NULL, parameters_->Parameters(context), statements_));
}
CYStatement *CYProtocol::Replace(CYContext &context) const { $T(NULL)