]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Syntax.hpp
Macros have to support overriding old definitions.
[cycript.git] / ObjectiveC / Syntax.hpp
index 16927ac34ca314c03e149375785cb19c7a70104d..f47d935c3e2b14dab99a9b672cc763042eeddd21 100644 (file)
@@ -1,5 +1,5 @@
-/* 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 {{{ */
@@ -76,6 +76,52 @@ struct CYBox :
     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
@@ -131,7 +177,8 @@ struct CYMessageParameter :
     CYWord *name_;
     CYTypedIdentifier *type_;
 
-    CYMessageParameter(CYWord *name, CYTypedIdentifier *type) :
+    CYMessageParameter(CYWord *name, CYTypedIdentifier *type, CYMessageParameter *next = NULL) :
+        CYNext<CYMessageParameter>(next),
         name_(name),
         type_(type)
     {