if (extra != NULL)
left = $ CYAdd(left, extra);
- if (next == NULL)
+ if (next == NULL || next->name_ == NULL)
return left;
CYExpression *right(next->TypeSignature(context));
return $E(Replace_(context));
}
-CYStatement *CYField::Replace(CYContext &context) const {
- return NULL;
+CYExpression *CYTypeArrayOf::Replace(CYContext &context) {
+ return $ CYCall($ CYDirectMember(next_->Replace(context), $ CYString("arrayOf")), $ CYArgument($ CYNumber(size_)));
+}
+
+CYExpression *CYTypeConstant::Replace(CYContext &context) {
+ return $ CYCall($ CYDirectMember(next_->Replace(context), $ CYString("constant")));
+}
+
+CYExpression *CYTypePointerTo::Replace(CYContext &context) {
+ return $ CYCall($ CYDirectMember(next_->Replace(context), $ CYString("pointerTo")));
+}
+
+CYExpression *CYTypeVariable::Replace(CYContext &context) {
+ return expression_;
+}
+
+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"));
+
+ CYExpression *type($C0($M(type_, $S("toString"))));
+
+ return $ CYBlock($$->*
+ next_->Replace(context)->*
+ $E($ CYAssign(cyt, type))->*
+ $E($ CYAssign(cyn, $N1($V("Type"), cyt)))->*
+ $E($C5($V("class_addIvar"), $V("$cyc"), $S(name_->Word()), $M(cyn, $S("size")), $M(cyn, $S("alignment")), cyt))
+ );
}
CYStatement *CYImport::Replace(CYContext &context) {
}
CYExpression *CYSelector::Replace(CYContext &context) {
- return $N1($V("Selector"), name_->Replace(context));
+ return $C1($V("sel_registerName"), name_->Replace(context));
}
CYString *CYSelectorPart::Replace(CYContext &context) {