X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/2c81c6df02e9a20c96234524b0a1db7801d542ec..0ced2e47fe333ec4a4b1222fa298561c5479696c:/Parser.hpp?ds=sidebyside diff --git a/Parser.hpp b/Parser.hpp index a963d7b..a994ead 100644 --- a/Parser.hpp +++ b/Parser.hpp @@ -50,6 +50,7 @@ #include #include +#include #include #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 Words; + Words words_; + }; + + typedef std::vector 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();