X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fparser.h;h=a935356ecd1339e68e6bb82f2752a5d47e6a25fb;hp=c98867a3791e866ecd31a9c7cc5076e7443482cf;hb=e2ed3de4cbbc682ff490a3b0b760b8a45260f611;hpb=3a1fe833ea04df75449706f1d773f6e65521a392 diff --git a/source/glsl/parser.h b/source/glsl/parser.h index c98867a3..a935356e 100644 --- a/source/glsl/parser.h +++ b/source/glsl/parser.h @@ -12,9 +12,12 @@ namespace Msp { namespace GL { namespace SL { +class ModuleCache; + class Parser { private: + ModuleCache *mod_cache; std::string source; int base_index; int source_index; @@ -22,16 +25,17 @@ private: Preprocessor preprocessor; bool allow_stage_change; Module *module; + std::vector imported_modules; Stage *cur_stage; - std::set declared_types; + std::set global_types; + std::set stage_types; std::vector errors; public: - Parser(); - ~Parser(); + Parser(ModuleCache *); - Module &parse(const std::string &, const std::string &, int); - Module &parse(IO::Base &, const std::string &, int); + void parse(Module &, const std::string &, const std::string &, int); + void parse(Module &, IO::Base &, const std::string &, int); private: void parse_source(const std::string &, int);