X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/a7d8b4130acfb550e437d8cf1f6d3d81cb0cf6ee..9d2b125d81372b42e8ae310c8de8650d13010d1e:/Driver.hpp diff --git a/Driver.hpp b/Driver.hpp index a4458a2..0df39d7 100644 --- a/Driver.hpp +++ b/Driver.hpp @@ -31,29 +31,35 @@ #include "Location.hpp" #include "Parser.hpp" +enum CYMark { + CYMarkIgnore, + CYMarkScript, + CYMarkModule, +}; + class _visible CYDriver { public: CYPool &pool_; void *scanner_; + std::vector buffer_; + bool tail_; + std::stack in_; + std::stack return_; + std::stack template_; + std::stack yield_; bool newline_; bool last_; - - struct { - bool AtImplementation; - bool Class; - bool Function; - bool OpenBrace; - bool NewLine; - } no_; + bool next_; std::istream &data_; + CYMark mark_; int debug_; bool strict_; - bool commented_; + bool highlight_; enum Condition { RegExpCondition, @@ -109,10 +115,9 @@ class _visible CYDriver { CYDriver(CYPool &pool, std::istream &data, const std::string &filename = ""); ~CYDriver(); - bool Parse(); + bool Parse(CYMark mark = CYMarkScript); void Replace(CYOptions &options); - Condition GetCondition(); void SetCondition(Condition condition); void PushCondition(Condition condition);