]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Syntax.hpp
Remove and compress some dead code in CYDisplayOutput.
[cycript.git] / ObjectiveC / Syntax.hpp
index a5e826de70c899a1843dca6f775fac7f3ff423dc..580ea3adbaddbdf7a468be134c6724d1257c0994 100644 (file)
@@ -1,5 +1,5 @@
 /* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2010  Jay Freeman (saurik)
+ * Copyright (C) 2009-2012  Jay Freeman (saurik)
 */
 
 /* GNU Lesser General Public License, Version 3 {{{ */
 
 #include "Parser.hpp"
 
+struct CYBox :
+    CYExpression
+{
+    CYExpression *value_;
+
+    CYBox(CYExpression *value) :
+        value_(value)
+    {
+    }
+
+    CYPrecedence(1)
+
+    virtual CYExpression *Replace(CYContext &context);
+    virtual void Output(CYOutput &out, CYFlags flags) const;
+};
+
 struct CYSelectorPart :
     CYNext<CYSelectorPart>,
     CYThing
@@ -61,6 +77,16 @@ struct CYSelector :
 struct CYField :
     CYNext<CYField>
 {
+    CYExpression *type_;
+    CYIdentifier *name_;
+
+    CYField(CYExpression *type, CYIdentifier *name, CYField *next = NULL) :
+        CYNext<CYField>(next),
+        type_(type),
+        name_(name)
+    {
+    }
+
     CYStatement *Replace(CYContext &context) const;
     void Output(CYOutput &out) const;
 };
@@ -82,6 +108,7 @@ struct CYMessageParameter :
     CYFunctionParameter *Parameters(CYContext &context) const;
     CYSelector *Selector(CYContext &context) const;
     CYSelectorPart *SelectorPart(CYContext &context) const;
+    CYExpression *TypeSignature(CYContext &context) const;
 };
 
 struct CYMessage :
@@ -102,6 +129,8 @@ struct CYMessage :
 
     CYStatement *Replace(CYContext &context, bool replace) const;
     void Output(CYOutput &out, bool replace) const;
+
+    CYExpression *TypeSignature(CYContext &context) const;
 };
 
 struct CYProtocol :