]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/parser.h
Store actual values for literals
[libs/gl.git] / source / glsl / parser.h
index bce9698f7d608a4b3c18417bf2eef1d149f54a81..13ec0ab9a1f8de2f0acdd279e3a4bef1ed35403e 100644 (file)
@@ -50,7 +50,6 @@ private:
        static bool is_interpolation_qualifier(const std::string &);
        static bool is_precision_qualifier(const std::string &);
        static bool is_qualifier(const std::string &);
-       static bool is_builtin_type(const std::string &);
        bool is_type(const std::string &);
        bool is_identifier(const std::string &);
 
@@ -60,9 +59,11 @@ private:
        void preprocess_pragma_msp();
        void preprocess_stage();
 
-       RefPtr<Statement> parse_global_declaration();
+       template<typename T>
+       RefPtr<T> create_node();
        template<typename T>
        RefPtr<T> parse_with_recovery(RefPtr<T> (Parser::*)());
+       RefPtr<Statement> parse_global_declaration();
        RefPtr<Statement> parse_statement();
        RefPtr<Import> parse_import();
        RefPtr<Precision> parse_precision();
@@ -70,8 +71,12 @@ 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<Literal> parse_literal();
+       RefPtr<BinaryExpression> parse_binary(const RefPtr<Expression> &, const Operator &);
        RefPtr<FunctionCall> parse_function_call(const VariableReference &);
+       RefPtr<TypeDeclaration> parse_type_declaration();
+       RefPtr<BasicTypeDeclaration> parse_basic_type_declaration();
+       RefPtr<ImageTypeDeclaration> parse_image_type_declaration();
        RefPtr<StructDeclaration> parse_struct_declaration();
        RefPtr<VariableDeclaration> parse_variable_declaration();
        RefPtr<VariableDeclaration> parse_variable_declaration_with_layout();