]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Syntax.hpp
Implement full unsigned/signed/long/short syntax.
[cycript.git] / ObjectiveC / Syntax.hpp
index 343cb37e903886be871bfdfcf90f39283b5b4ff2..4c15344da5a4265c5889a51f370957d1ac1d5e0f 100644 (file)
 
 #include "Parser.hpp"
 
-struct CYObjCBlock :
+struct CYInstanceLiteral :
     CYExpression
 {
-    CYTypeModifier *type_;
-    CYTypedParameter *parameters_;
-    CYStatement *statements_;
+    CYNumber *number_;
 
-    CYObjCBlock(CYTypeModifier *type, CYTypedParameter *parameters, CYStatement *statements) :
-        type_(type),
-        parameters_(parameters),
-        statements_(statements)
+    CYInstanceLiteral(CYNumber *number) :
+        number_(number)
     {
     }
 
@@ -44,13 +40,17 @@ struct CYObjCBlock :
     virtual void Output(CYOutput &out, CYFlags flags) const;
 };
 
-struct CYEncodedType :
+struct CYObjCBlock :
     CYExpression
 {
-    CYTypeModifier *type_;
+    CYTypedIdentifier *typed_;
+    CYTypedParameter *parameters_;
+    CYStatement *statements_;
 
-    CYEncodedType(CYTypeModifier *type) :
-        type_(type)
+    CYObjCBlock(CYTypedIdentifier *typed, CYTypedParameter *parameters, CYStatement *statements) :
+        typed_(typed),
+        parameters_(parameters),
+        statements_(statements)
     {
     }
 
@@ -185,9 +185,32 @@ struct CYProtocol :
     void Output(CYOutput &out) const;
 };
 
+struct CYModule :
+    CYNext<CYModule>,
+    CYThing
+{
+    CYWord *part_;
+
+    CYModule(CYWord *part, CYModule *next = NULL) :
+        CYNext<CYModule>(next),
+        part_(part)
+    {
+    }
+
+    CYString *Replace(CYContext &context, const char *separator) const;
+    void Output(CYOutput &out) const;
+};
+
 struct CYImport :
     CYStatement
 {
+    CYModule *module_;
+
+    CYImport(CYModule *module) :
+        module_(module)
+    {
+    }
+
     virtual CYStatement *Replace(CYContext &context);
     virtual void Output(CYOutput &out, CYFlags flags) const;
 };