X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramparser.h;h=903e58346f7a425a365cccfcf162f56caa75fa6e;hp=be6da197481aa3d264c7516427b55859e40e04d9;hb=20af6dd2f04caa224d8cae00befc97d010a1ed08;hpb=eb6a546dcffc1b67f0a23d8b075fbdc86a2872a0 diff --git a/source/programparser.h b/source/programparser.h index be6da197..903e5834 100644 --- a/source/programparser.h +++ b/source/programparser.h @@ -40,6 +40,9 @@ private: std::string source_name; unsigned current_line; std::string::const_iterator iter; + std::string::const_iterator source_end; + bool allow_preprocess; + bool allow_stage_change; std::string last_token; std::deque next_tokens; ProgramSyntax::Module *module; @@ -67,7 +70,7 @@ private: std::string parse_identifier(); std::string parse_number(); std::string parse_other(); - bool skip_comment_and_whitespace(); + void skip_comment_and_whitespace(); void expect(const std::string &); std::string expect_type(); std::string expect_identifier(); @@ -75,12 +78,18 @@ private: static bool is_interface_qualifier(const std::string &); static bool is_sampling_qualifier(const std::string &); + 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 &); + void preprocess(); + void preprocess_pragma(); + void preprocess_pragma_msp(); + void preprocess_stage(); + RefPtr parse_global_declaration(); RefPtr parse_statement(); RefPtr parse_import();