]> git.saurik.com Git - cycript.git/blobdiff - Console.cpp
Replace AtEncode in grammar with "@encode" token.
[cycript.git] / Console.cpp
index 2a1b0f782ce5df1fab25716ffcc989017b97388a..c2c46f9d5b0325158f0cfa8291a85f923bdd6e10 100644 (file)
@@ -497,6 +497,14 @@ static void Console(CYOptions &options) {
                 } else if (data == "debug") {
                     debug = !debug;
                     *out_ << "debug == " << (debug ? "true" : "false") << std::endl;
+                } else if (data == "destroy") {
+                    CYDestroyContext();
+                } else if (data == "gc") {
+                    *out_ << "collecting... " << std::flush;
+                    CYGarbageCollect(CYGetJSContext());
+                    *out_ << "done." << std::endl;
+                } else if (data == "exit") {
+                    return;
                 } else if (data == "expand") {
                     expand = !expand;
                     *out_ << "expand == " << (expand ? "true" : "false") << std::endl;
@@ -587,6 +595,7 @@ static void Console(CYOptions &options) {
         history += command_;
 
         if (debug) {
+            std::cout << "cy= ";
             Write(syntax, code.c_str(), code.size(), std::cout);
             std::cout << std::endl;
         }