X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramsyntax.h;h=6a03f40fab67b2f4b02d17de5873587edf1d3e88;hp=d681c50b924065f69a1ae990381af884d00bef0e;hb=94ee5852b42b05559069596e205dc2f000e6153f;hpb=f02daac8305327d403e947e23c4f2d231eced417 diff --git a/source/programsyntax.h b/source/programsyntax.h index d681c50b..6a03f40f 100644 --- a/source/programsyntax.h +++ b/source/programsyntax.h @@ -7,6 +7,10 @@ #include #include #include "extension.h" +#include "uniform.h" + +#pragma push_macro("interface") +#undef interface namespace Msp { namespace GL { @@ -178,10 +182,20 @@ struct Import: Node virtual void visit(NodeVisitor &); }; +struct Precision: Node +{ + std::string precision; + std::string type; + + virtual Precision *clone() const { return new Precision(*this); } + virtual void visit(NodeVisitor &); +}; + struct Layout: Node { struct Qualifier { + // TODO the standard calls this name, not identifier std::string identifier; std::string value; }; @@ -216,7 +230,9 @@ struct VariableDeclaration: Node { bool constant; std::string sampling; + std::string interpolation; std::string interface; + std::string precision; std::string type; StructDeclaration *type_declaration; std::string name; @@ -321,6 +337,7 @@ struct NodeVisitor virtual void visit(FunctionCall &) { } virtual void visit(ExpressionStatement &) { } virtual void visit(Import &) { } + virtual void visit(Precision &) { } virtual void visit(Layout &) { } virtual void visit(InterfaceLayout &) { } virtual void visit(StructDeclaration &) { } @@ -336,6 +353,7 @@ struct NodeVisitor struct TraversingVisitor: NodeVisitor { + using NodeVisitor::visit; virtual void visit(Block &); virtual void visit(ParenthesizedExpression &); virtual void visit(MemberAccess &); @@ -387,4 +405,6 @@ struct Module } // namespace GL } // namespace Msp +#pragma pop_macro("interface") + #endif