X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramcompiler.h;h=8ae22901e89dcbfb19bf08fc2a25929aaddf9188;hb=74bd3813b9744550c9ac5980588e561835b616d9;hp=96fee471cc7e5351a59e7d51f9b3772862bcc195;hpb=acec85413f86c58ff262fbc26c2c1aa8726b5c58;p=libs%2Fgl.git diff --git a/source/programcompiler.h b/source/programcompiler.h index 96fee471..8ae22901 100644 --- a/source/programcompiler.h +++ b/source/programcompiler.h @@ -38,6 +38,7 @@ private: Formatter(); + virtual void apply(ProgramSyntax::Stage &); const std::string &get_result() const { return formatted; } virtual void visit(ProgramSyntax::Block &); virtual void visit(ProgramSyntax::Literal &); @@ -246,6 +247,22 @@ private: virtual void visit(ProgramSyntax::VariableDeclaration &); }; + struct LegacyConverter: BlockModifier + { + Version target_version; + std::string type; + std::string frag_out_name; + + LegacyConverter(); + LegacyConverter(const Version &); + + bool check_version(const Version &); + virtual void visit(ProgramSyntax::VariableReference &); + virtual void visit(ProgramSyntax::FunctionCall &); + virtual void visit(ProgramSyntax::VariableDeclaration &); + virtual void visit(ProgramSyntax::InterfaceBlock &); + }; + Resources *resources; ProgramParser parser; ProgramSyntax::Module *module;