CYVariable *cyn($V("$cyn"));
CYVariable *cyt($V("$cyt"));
- CYExpression *type($C0($M(type_, $S("toString"))));
+ CYExpression *type($C0($M(typed_->Replace(context), $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))
+ $E($C5($V("class_addIvar"), $V("$cyc"), $S(typed_->identifier_->Word()), $M(cyn, $S("size")), $M(cyn, $S("alignment")), cyt))->*
+ next_->Replace(context)
);
}
return $ CYVar($L1($L(module_->part_->Word(), $C1($V("require"), module_->Replace(context, "/")))));
}
+CYExpression *CYInstanceLiteral::Replace(CYContext &context) {
+ return $N1($V("Instance"), number_);
+}
+
CYStatement *CYMessage::Replace(CYContext &context, bool replace) const { $T(NULL)
CYVariable *cyn($V("$cyn"));
CYVariable *cyt($V("$cyt"));
$V(instance_ ? "$cyc" : "$cym"),
cyn,
$N2($V("Functor"), $F(NULL, $P2($L("self"), $L("_cmd"), parameters_->Parameters(context)), $$->*
- $ CYVar($L1($L("$cyr", $N2($V("Super"), self, _class))))->*
+ $ CYVar($L1($L("$cyr", $N2($V("objc_super"), self, _class))))->*
$ CYReturn($C1($M($F(NULL, NULL, code_), $S("call")), self))
), cyt),
cyt
}
CYExpression *CYObjCBlock::Replace(CYContext &context) {
- return $N2($V("Functor"), $ CYFunctionExpression(NULL, $ CYFunctionParameter($ CYDeclaration($ CYIdentifier("$cyt")), parameters_->Parameters(context)), statements_), parameters_->TypeSignature(context, $ CYAdd(typed_->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)
argument = &(*argument)->next_;
}
- return $C2($V("objc_msgSend"), self_, ($ CYSelector(selector))->Replace(context), arguments_);
+ return $C2($V("objc_msgSend"), self_, selector->Replace(context), arguments_);
}
CYExpression *CYSendSuper::Replace(CYContext &context) {