]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programparser.h
Refactor module and stage management
[libs/gl.git] / source / programparser.h
index 1ca1a44c564d7aa8e6e65ed5f37e465b6a3f2340..4c2d7b7ea5bc1049ddacede49a9f6a1cb280d3e7 100644 (file)
@@ -39,19 +39,21 @@ private:
        std::string source;
        std::string::const_iterator iter;
        std::deque<std::string> next_tokens;
-       ProgramSyntax::Module main_module;
-       ProgramSyntax::Module *cur_module;
+       ProgramSyntax::Module *module;
        ProgramSyntax::Stage *cur_stage;
        std::set<std::string> declared_types;
 
        static Operator operators[];
 
 public:
+       ProgramParser();
+       ~ProgramParser();
+
        ProgramSyntax::Module &parse(const std::string &);
        ProgramSyntax::Module &parse(IO::Base &);
 
 private:
-       void parse_source(ProgramSyntax::Module &);
+       void parse_source();
 
        const std::string &peek_token(unsigned = 0);
        std::string parse_token();