X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramparser.h;h=dc94bd0044443bd01ca862584e6784a58da4fb9f;hp=fa37118de262efe46c02ad0c6c13dcdf43b4517c;hb=71972b08fd031e177a005eb1924a5c7a15459291;hpb=4bee7581168e0803dd24568b61e590d2a4830f96 diff --git a/source/programparser.h b/source/programparser.h index fa37118d..dc94bd00 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(); @@ -78,6 +79,7 @@ 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 &); @@ -89,8 +91,8 @@ private: 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(); @@ -103,7 +105,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(); };