}
}
+CYTarget *CYResolveMember::Replace(CYContext &context) {
+ return $M($M(object_, $S("$cyr")), property_);
+}
+
CYStatement *CYReturn::Replace(CYContext &context) {
if (context.nonlocal_ != NULL) {
CYProperty *value(value_ == NULL ? NULL : $ CYPropertyValue($S("$cyv"), value_));
return $C($C1($M($V(context.super_), $S("bind")), $ CYThis()), arguments_);
}
+CYTarget *CYSymbol::Replace(CYContext &context) {
+ return $C1($M($V("Symbol"), $S("for")), $S(name_));
+}
+
CYStatement *CYSwitch::Replace(CYContext &context) {
context.Replace(value_);
clauses_->Replace(context);
}
CYTarget *CYTypeFunctionWith::Replace_(CYContext &context, CYTarget *type) {
- return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("functionWith")), parameters_->Argument(context)));
+ CYList<CYArgument> arguments(parameters_->Argument(context));
+ if (variadic_)
+ arguments->*$C_($ CYNull());
+ return next_->Replace(context, $ CYCall($ CYDirectMember(type, $ CYString("functionWith")), arguments));
}
CYTarget *CYTypePointerTo::Replace_(CYContext &context, CYTarget *type) {
}
CYTypeFunctionWith *CYTypedIdentifier::Function() {
- CYTypeModifier **modifier(&modifier_);
- if (*modifier == NULL)
+ CYTypeModifier *&modifier(CYGetLast(modifier_));
+ if (modifier == NULL)
return NULL;
- while ((*modifier)->next_ != NULL)
- modifier = &(*modifier)->next_;
- CYTypeFunctionWith *function((*modifier)->Function());
+
+ CYTypeFunctionWith *function(modifier->Function());
if (function == NULL)
return NULL;
- *modifier = NULL;
+
+ modifier = NULL;
return function;
}