X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b900e1a43acf792e7eaccff2418919d02382cd3c..bf998c10baabbd95f2d59d29f9edea0eb107b156:/Driver.hpp diff --git a/Driver.hpp b/Driver.hpp index 3f0a960..adb03f2 100644 --- a/Driver.hpp +++ b/Driver.hpp @@ -29,7 +29,19 @@ #include #include "Location.hpp" -#include "Parser.hpp" +#include "Options.hpp" +#include "Pooling.hpp" +#include "Standard.hpp" + +struct CYClassTail; +struct CYExpression; +struct CYScript; +struct CYWord; + +enum CYMark { + CYMarkScript, + CYMarkModule, +}; class _visible CYDriver { public: @@ -40,27 +52,25 @@ class _visible CYDriver { bool tail_; std::stack in_; + std::stack return_; + std::stack super_; std::stack template_; + std::stack yield_; + + std::stack class_; + CYMark mark_; + int hold_; bool newline_; bool last_; - struct { - bool AtImplementation; - bool Class; - bool Function; - bool OpenBrace; - bool NewLine; - } no_; - - std::istream &data_; + std::streambuf &data_; int debug_; bool strict_; bool highlight_; enum Condition { - RegExpCondition, XMLContentCondition, XMLTagCondition, }; @@ -110,12 +120,13 @@ class _visible CYDriver { void ScannerDestroy(); public: - CYDriver(CYPool &pool, std::istream &data, const std::string &filename = ""); + CYDriver(CYPool &pool, std::streambuf &data, const std::string &filename = ""); ~CYDriver(); - bool Parse(); + bool Parse(CYMark mark = CYMarkModule); void Replace(CYOptions &options); + void SetRegEx(bool equal); void SetCondition(Condition condition); void PushCondition(Condition condition);