X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramparser.h;h=fa37118de262efe46c02ad0c6c13dcdf43b4517c;hp=be6da197481aa3d264c7516427b55859e40e04d9;hb=bfeb6c6404659fffb1222e084b0bd08cccb4e67d;hpb=eb6a546dcffc1b67f0a23d8b075fbdc86a2872a0 diff --git a/source/programparser.h b/source/programparser.h index be6da197..fa37118d 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(); @@ -81,6 +84,11 @@ private: 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();