-/* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2015 Jay Freeman (saurik)
+/* Cycript - The Truly Universal Scripting Language
+ * Copyright (C) 2009-2016 Jay Freeman (saurik)
*/
/* GNU Affero General Public License, Version 3 {{{ */
virtual void Output(CYOutput &out, CYFlags flags) const;
};
+struct CYObjCArray :
+ CYTarget
+{
+ CYElement *elements_;
+
+ CYObjCArray(CYElement *elements = NULL) :
+ elements_(elements)
+ {
+ }
+
+ CYPrecedence(0)
+
+ virtual CYTarget *Replace(CYContext &context);
+ virtual void Output(CYOutput &out, CYFlags flags) const;
+};
+
+struct CYObjCKeyValue :
+ CYNext<CYObjCKeyValue>
+{
+ CYExpression *key_;
+ CYExpression *value_;
+
+ CYObjCKeyValue(CYExpression *key, CYExpression *value, CYObjCKeyValue *next) :
+ CYNext<CYObjCKeyValue>(next),
+ key_(key),
+ value_(value)
+ {
+ }
+};
+
+struct CYObjCDictionary :
+ CYTarget
+{
+ CYObjCKeyValue *pairs_;
+
+ CYObjCDictionary(CYObjCKeyValue *pairs) :
+ pairs_(pairs)
+ {
+ }
+
+ CYPrecedence(0)
+
+ virtual CYTarget *Replace(CYContext &context);
+ virtual void Output(CYOutput &out, CYFlags flags) const;
+};
+
struct CYSelectorPart :
CYNext<CYSelectorPart>,
CYThing
struct CYSelector :
CYLiteral
{
- CYSelectorPart *name_;
+ CYSelectorPart *parts_;
- CYSelector(CYSelectorPart *name) :
- name_(name)
+ CYSelector(CYSelectorPart *parts) :
+ parts_(parts)
{
}
struct CYMessageParameter :
CYNext<CYMessageParameter>
{
- CYWord *tag_;
+ CYWord *name_;
CYTypedIdentifier *type_;
- CYMessageParameter(CYWord *tag, CYTypedIdentifier *type) :
- tag_(tag),
+ CYMessageParameter(CYWord *name, CYTypedIdentifier *type, CYMessageParameter *next = NULL) :
+ CYNext<CYMessageParameter>(next),
+ name_(name),
type_(type)
{
}
CYMessageParameter *parameters_;
CYBlock code_;
- CYMessage(bool instance, CYTypedIdentifier *type, CYMessageParameter *parameter, CYStatement *code) :
+ CYMessage(bool instance, CYTypedIdentifier *type, CYMessageParameter *parameters, CYStatement *code) :
instance_(instance),
type_(type),
- parameters_(parameter),
+ parameters_(parameters),
code_(code)
{
}
CYStatement
{
CYIdentifier *name_;
- CYExpression *super_;
+ CYExpression *extends_;
CYProtocol *protocols_;
CYImplementationField *fields_;
CYMessage *messages_;
- CYImplementation(CYIdentifier *name, CYExpression *super, CYProtocol *protocols, CYImplementationField *fields, CYMessage *messages) :
+ CYImplementation(CYIdentifier *name, CYExpression *extends, CYProtocol *protocols, CYImplementationField *fields, CYMessage *messages) :
name_(name),
- super_(super),
+ extends_(extends),
protocols_(protocols),
fields_(fields),
messages_(messages)