]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/parser.h
Refactor adding types in SL::Parser
[libs/gl.git] / source / glsl / parser.h
index e087f27f9d0578bd6e23be8fee0c44e841cd3cb3..b35b8bbe084d73b888efbb7431f3e57b82ca660c 100644 (file)
@@ -25,8 +25,10 @@ private:
        Preprocessor preprocessor;
        bool allow_stage_change;
        Module *module;
+       std::vector<const Module *> imported_modules;
        Stage *cur_stage;
-       std::set<std::string> declared_types;
+       std::set<std::string> global_types;
+       std::set<std::string> stage_types;
        std::vector<std::string> errors;
 
 public:
@@ -77,6 +79,7 @@ private:
        RefPtr<BinaryExpression> parse_binary(const RefPtr<Expression> &, const Operator &);
        RefPtr<TernaryExpression> parse_ternary(const RefPtr<Expression> &, const Operator &);
        RefPtr<FunctionCall> parse_function_call(const VariableReference &);
+       void add_type(TypeDeclaration &);
        RefPtr<TypeDeclaration> parse_type_declaration();
        RefPtr<BasicTypeDeclaration> parse_basic_type_declaration();
        RefPtr<ImageTypeDeclaration> parse_image_type_declaration();