]> git.saurik.com Git - cycript.git/blobdiff - Parser.hpp
Make CYExecute take a CYUTF8String and fix the size shell game in Console's Run.
[cycript.git] / Parser.hpp
index a963d7ba662d4d7127aabb221e5feeed462e5991..a994ead8c08a49c36c3c9ea49f1b0827ffac17c9 100644 (file)
@@ -50,6 +50,7 @@
 #include <map>
 #include <set>
 
+#include <cstdio>
 #include <cstdlib>
 
 #include "location.hh"
@@ -452,12 +453,39 @@ class CYDriver {
     CYProgram *program_;
     Errors errors_;
 
+    bool auto_;
+
+    struct Context {
+        CYExpression *context_;
+
+        Context(CYExpression *context) :
+            context_(context)
+        {
+        }
+
+        typedef std::vector<CYWord *> Words;
+        Words words_;
+    };
+
+    typedef std::vector<Context> Contexts;
+    Contexts contexts_;
+
+    CYExpression *context_;
+
+    enum Mode {
+        AutoNone,
+        AutoPrimary,
+        AutoDirect,
+        AutoIndirect,
+        AutoMessage
+    } mode_;
+
   private:
     void ScannerInit();
     void ScannerDestroy();
 
   public:
-    CYDriver(const std::string &filename);
+    CYDriver(apr_pool_t *pool = NULL, const std::string &filename = "");
     ~CYDriver();
 
     Condition GetCondition();