/* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2014 Jay Freeman (saurik)
+ * Copyright (C) 2009-2015 Jay Freeman (saurik)
*/
/* GNU Affero General Public License, Version 3 {{{ */
return NULL;
}
+CYStatement *CYExternal::Replace(CYContext &context) {
+ return $E($ CYAssign($V(typed_->identifier_), $C1(typed_->Replace(context), $C2($V("dlsym"), $V("RTLD_DEFAULT"), $S(typed_->identifier_->Word())))));
+}
+
CYNumber *CYFalse::Number(CYContext &context) {
return $D(0);
}
}
CYStatement *CYForOfComprehension::Replace(CYContext &context, CYStatement *statement) const {
- CYIdentifier *cys($I("cys"));
+ CYIdentifier *cys($I("$cys"));
return $E($C0($F(NULL, $P1($L("$cys")), $$->*
$E($ CYAssign($V(cys), set_))->*
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));
}