]> git.saurik.com Git - cycript.git/blobdiff - Syntax.hpp
Instance's toPointer() should return as CFTypeRef.
[cycript.git] / Syntax.hpp
index ea55a3fba59908a67ce9ca38280d2cb8c1039b19..4b25b30738efa55e30a7122ac22ecc4df31f37f6 100644 (file)
@@ -40,7 +40,14 @@ double CYCastDouble(const char *value);
 double CYCastDouble(CYUTF8String value);
 
 void CYNumerify(std::ostringstream &str, double value);
-void CYStringify(std::ostringstream &str, const char *data, size_t size, bool c = false);
+
+enum CYStringifyMode {
+    CYStringifyModeLegacy,
+    CYStringifyModeCycript,
+    CYStringifyModeNative,
+};
+
+void CYStringify(std::ostringstream &str, const char *data, size_t size, CYStringifyMode mode);
 
 // XXX: this really should not be here ... :/
 void *CYPoolFile(CYPool &pool, const char *path, size_t *psize);
@@ -839,6 +846,8 @@ struct CYTemplate :
 
     CYPrecedence(0)
 
+    virtual CYString *String(CYContext &context);
+
     virtual CYTarget *Replace(CYContext &context);
     virtual void Output(CYOutput &out, CYFlags flags) const;
 };
@@ -1472,6 +1481,20 @@ struct CYDirectMember :
     virtual void Output(CYOutput &out, CYFlags flags) const;
 };
 
+struct CYAttemptMember :
+    CYMember
+{
+    CYAttemptMember(CYExpression *object, CYExpression *property) :
+        CYMember(object, property)
+    {
+    }
+
+    CYPrecedence(1)
+
+    virtual CYTarget *Replace(CYContext &context);
+    virtual void Output(CYOutput &out, CYFlags flags) const;
+};
+
 struct CYIndirectMember :
     CYMember
 {
@@ -2145,6 +2168,20 @@ struct CYTypeIntegral :
     virtual void Output(CYOutput &out) const;
 };
 
+struct CYTypeFloating :
+    CYTypeSpecifier
+{
+    int length_;
+
+    CYTypeFloating(int length) :
+        length_(length)
+    {
+    }
+
+    virtual CYTarget *Replace(CYContext &context);
+    virtual void Output(CYOutput &out) const;
+};
+
 struct CYTypeVoid :
     CYTypeSpecifier
 {