]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Syntax.hpp
Filter chosen objects to those of the right size.
[cycript.git] / ObjectiveC / Syntax.hpp
index 0caaad469544d96d81d18bf5ddb547a8ef9bba84..343cb37e903886be871bfdfcf90f39283b5b4ff2 100644 (file)
@@ -1,20 +1,20 @@
 /* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2012  Jay Freeman (saurik)
+ * Copyright (C) 2009-2013  Jay Freeman (saurik)
 */
 
-/* GNU Lesser General Public License, Version 3 {{{ */
+/* GNU General Public License, Version 3 {{{ */
 /*
- * Cycript is free software: you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or (at your
- * option) any later version.
+ * Cycript is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
  *
- * Cycript is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
- * License for more details.
+ * Cycript is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU Lesser General Public License
+ * You should have received a copy of the GNU General Public License
  * along with Cycript.  If not, see <http://www.gnu.org/licenses/>.
 **/
 /* }}} */
 
 #include "Parser.hpp"
 
-struct CYEncodedPart :
-    CYNext<CYEncodedPart>
+struct CYObjCBlock :
+    CYExpression
 {
-    const char *name_;
-    CYArgument *arguments_;
+    CYTypeModifier *type_;
+    CYTypedParameter *parameters_;
+    CYStatement *statements_;
 
-    CYEncodedPart(CYEncodedPart *next, const char *name, CYArgument *arguments = NULL) :
-        CYNext<CYEncodedPart>(next),
-        name_(name),
-        arguments_(arguments)
+    CYObjCBlock(CYTypeModifier *type, CYTypedParameter *parameters, CYStatement *statements) :
+        type_(type),
+        parameters_(parameters),
+        statements_(statements)
     {
     }
 
-    CYExpression *Replace(CYContext &context, CYExpression *base);
+    CYPrecedence(1)
+
+    virtual CYExpression *Replace(CYContext &context);
+    virtual void Output(CYOutput &out, CYFlags flags) const;
 };
 
 struct CYEncodedType :
     CYExpression
 {
-    CYExpression *base_;
-    CYEncodedPart *parts_;
+    CYTypeModifier *type_;
 
-    CYEncodedType(CYExpression *base, CYEncodedPart *parts = NULL) :
-        base_(base),
-        parts_(parts)
+    CYEncodedType(CYTypeModifier *type) :
+        type_(type)
     {
     }