X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fprogramparser.h;h=e36604736b9f5cf4dfd28548038b87c371d76834;hb=53dac3ba3cb3a1e4ed23d5fa459187acde7a4904;hp=707815405684252f1fc06c33341ea19b5ba5199c;hpb=48453f59ec93d9b8f70a17d3034e5ca3e4780ecd;p=libs%2Fgl.git diff --git a/source/programparser.h b/source/programparser.h index 70781540..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();