X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fglsl%2Fparser.h;h=9ab1232aaa0d9ad7aec82b24ee873b8b4e998e16;hb=30465dd3b9f55ec42c4b19c3c2077eede7237a26;hp=58b14b502f5bf550e1285098a651662fcf653bbe;hpb=9d798ac368bfd236a7632a3a15e51bd1112ea63d;p=libs%2Fgl.git diff --git a/source/glsl/parser.h b/source/glsl/parser.h index 58b14b50..9ab1232a 100644 --- a/source/glsl/parser.h +++ b/source/glsl/parser.h @@ -16,6 +16,7 @@ class Parser { private: std::string source; + unsigned base_index; unsigned source_index; Tokenizer tokenizer; Preprocessor preprocessor; @@ -34,10 +35,13 @@ public: private: void parse_source(const std::string &, unsigned); void set_required_version(const Version &); + void source_reference(unsigned, const std::string &); void stage_change(Stage::Type); + void line_change(int, unsigned); std::string expect_type(); std::string expect_identifier(); + int expect_integer(); bool check(const std::string &); static bool is_interface_qualifier(const std::string &); @@ -60,12 +64,14 @@ private: RefPtr parse_import(); RefPtr parse_precision(); RefPtr parse_layout(); - void parse_block(Block &, bool); + template + void parse_block(Block &, bool, RefPtr (Parser::*)()); RefPtr parse_expression(unsigned = 0); RefPtr parse_binary(const RefPtr &, const Operator *); RefPtr parse_function_call(const VariableReference &); RefPtr parse_struct_declaration(); RefPtr parse_variable_declaration(); + RefPtr parse_variable_declaration_with_layout(); RefPtr parse_function_declaration(); RefPtr parse_interface_block(); RefPtr parse_conditional();