X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramparser.h;h=e36604736b9f5cf4dfd28548038b87c371d76834;hb=e85d8669d6c389ded738c7b536f83ea54176662f;hp=903e58346f7a425a365cccfcf162f56caa75fa6e;hpb=11520b2b95f4242b3ca4d2d3d14a0f2b5c1623f1;p=libs%2Fgl.git diff --git a/source/programparser.h b/source/programparser.h index 903e5834..e3660473 100644 --- a/source/programparser.h +++ b/source/programparser.h @@ -38,6 +38,7 @@ private: std::string source; std::string source_name; + unsigned source_index; unsigned current_line; std::string::const_iterator iter; std::string::const_iterator source_end; @@ -55,8 +56,8 @@ public: ProgramParser(); ~ProgramParser(); - ProgramSyntax::Module &parse(const std::string &, const std::string &); - ProgramSyntax::Module &parse(IO::Base &, const std::string &); + ProgramSyntax::Module &parse(const std::string &, const std::string &, unsigned = 0); + ProgramSyntax::Module &parse(IO::Base &, const std::string &, unsigned = 0); private: void parse_source(); @@ -86,12 +87,13 @@ private: bool is_identifier(const std::string &); void preprocess(); + void preprocess_version(); void preprocess_pragma(); void preprocess_pragma_msp(); void preprocess_stage(); - RefPtr parse_global_declaration(); - RefPtr parse_statement(); + RefPtr parse_global_declaration(); + RefPtr parse_statement(); RefPtr parse_import(); RefPtr parse_precision(); RefPtr parse_layout(); @@ -104,7 +106,8 @@ private: RefPtr parse_function_declaration(); RefPtr parse_interface_block(); RefPtr parse_conditional(); - RefPtr parse_iteration(); + RefPtr parse_for(); + RefPtr parse_while(); RefPtr parse_passthrough(); RefPtr parse_return(); };