]> git.saurik.com Git - cycript.git/blobdiff - Parser.hpp
Don't go nuts if there is an exception while completing.
[cycript.git] / Parser.hpp
index f48e81bff435c3400645a8665117ad6714fb116b..a994ead8c08a49c36c3c9ea49f1b0827ffac17c9 100644 (file)
@@ -453,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();