]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/parser.h
Use the new append utility function to build GLSL compile errors
[libs/gl.git] / source / glsl / parser.h
index acfb7d9eed9a8cc857becf5436e59a92bac522ba..376ccc6cd77fa996d02aeff1aa0baf59aea6167b 100644 (file)
@@ -16,8 +16,8 @@ class Parser
 {
 private:
        std::string source;
-       unsigned base_index;
-       unsigned source_index;
+       int base_index;
+       int source_index;
        Tokenizer tokenizer;
        Preprocessor preprocessor;
        bool allow_stage_change;
@@ -30,11 +30,11 @@ public:
        Parser();
        ~Parser();
 
-       Module &parse(const std::string &, const std::string &, unsigned = 0);
-       Module &parse(IO::Base &, const std::string &, unsigned = 0);
+       Module &parse(const std::string &, const std::string &, int);
+       Module &parse(IO::Base &, const std::string &, int);
 
 private:
-       void parse_source(const std::string &, unsigned);
+       void parse_source(const std::string &, int);
        void set_required_version(const Version &);
        void source_reference(unsigned, const std::string &);
        void stage_change(Stage::Type);
@@ -70,7 +70,7 @@ private:
        template<typename T>
        void parse_block(Block &, bool, RefPtr<T> (Parser::*)());
        RefPtr<Expression> parse_expression(unsigned = 0);
-       RefPtr<BinaryExpression> parse_binary(const RefPtr<Expression> &, const Operator *);
+       RefPtr<BinaryExpression> parse_binary(const RefPtr<Expression> &, const Operator &);
        RefPtr<FunctionCall> parse_function_call(const VariableReference &);
        RefPtr<StructDeclaration> parse_struct_declaration();
        RefPtr<VariableDeclaration> parse_variable_declaration();