+CYTarget *CYTypeArrayOf::Replace_(CYContext &context, CYTarget *type) {
+ return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("arrayOf")), $ CYArgument(size_)));
+}
+
+CYTarget *CYTypeBlockWith::Replace_(CYContext &context, CYTarget *type) {
+ return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("blockWith")), parameters_->Argument(context)));
+}
+
+CYTarget *CYTypeConstant::Replace_(CYContext &context, CYTarget *type) {
+ return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("constant"))));
+}
+
+CYStatement *CYTypeDefinition::Replace(CYContext &context) {
+ return $E($ CYAssign($V(typed_->identifier_), typed_->Replace(context)));
+}
+
+CYTarget *CYTypeError::Replace(CYContext &context) {
+ _assert(false);
+ return NULL;
+}
+
+CYTarget *CYTypeModifier::Replace(CYContext &context, CYTarget *type) { $T(type)
+ return Replace_(context, type);
+}
+
+CYTarget *CYTypeFunctionWith::Replace_(CYContext &context, CYTarget *type) {
+ return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("functionWith")), parameters_->Argument(context)));
+}
+
+CYTarget *CYTypeLong::Replace(CYContext &context) {
+ return $ CYCall($ CYDirectMember(specifier_->Replace(context), $ CYString("long")));
+}
+
+CYTarget *CYTypePointerTo::Replace_(CYContext &context, CYTarget *type) {
+ return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("pointerTo"))));
+}
+
+CYTarget *CYTypeShort::Replace(CYContext &context) {
+ return $ CYCall($ CYDirectMember(specifier_->Replace(context), $ CYString("short")));
+}
+
+CYTarget *CYTypeSigned::Replace(CYContext &context) {
+ return $ CYCall($ CYDirectMember(specifier_->Replace(context), $ CYString("signed")));
+}
+
+CYTarget *CYTypeUnsigned::Replace(CYContext &context) {
+ return $ CYCall($ CYDirectMember(specifier_->Replace(context), $ CYString("unsigned")));
+}
+
+CYTarget *CYTypeVariable::Replace(CYContext &context) {
+ return $V(name_);
+}
+
+CYTarget *CYTypeVoid::Replace(CYContext &context) {
+ return $N1($V("Type"), $ CYString("v"));
+}
+
+CYTarget *CYTypeVolatile::Replace_(CYContext &context, CYTarget *type) {
+ return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("volatile"))));
+}
+
+CYTarget *CYTypedIdentifier::Replace(CYContext &context) {
+ return modifier_->Replace(context, specifier_->Replace(context));
+}
+
+CYTypeFunctionWith *CYTypedIdentifier::Function() {
+ CYTypeModifier **modifier(&modifier_);
+ if (*modifier == NULL)
+ return NULL;
+ while ((*modifier)->next_ != NULL)
+ modifier = &(*modifier)->next_;
+ CYTypeFunctionWith *function((*modifier)->Function());
+ if (function == NULL)
+ return NULL;
+ *modifier = NULL;
+ return function;
+}
+
+CYArgument *CYTypedParameter::Argument(CYContext &context) { $T(NULL)
+ return $ CYArgument(typed_->Replace(context), next_->Argument(context));
+}
+
+CYFunctionParameter *CYTypedParameter::Parameters(CYContext &context) { $T(NULL)
+ return $ CYFunctionParameter($ CYDeclaration(typed_->identifier_ ?: context.Unique()), next_->Parameters(context));
+}
+
+CYExpression *CYTypedParameter::TypeSignature(CYContext &context, CYExpression *prefix) { $T(prefix)
+ return next_->TypeSignature(context, $ CYAdd(prefix, typed_->Replace(context)));
+}
+