X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.h;h=deb2c78027c0debcddaeac9eb0b24a4f693ec51e;hb=d3ceb2186dc79130508093b3d0c944771a53534f;hp=a2630ef06b52111b407daa8dd8d1c73ea7583260;hpb=c1b0303f65ee966a973197cbdbf177c571478674;p=libs%2Fgl.git diff --git a/source/glsl/syntax.h b/source/glsl/syntax.h index a2630ef0..deb2c780 100644 --- a/source/glsl/syntax.h +++ b/source/glsl/syntax.h @@ -16,6 +16,30 @@ namespace Msp { namespace GL { namespace SL { +struct Operator +{ + enum Type + { + NO_OPERATOR, + BINARY, + PREFIX, + POSTFIX + }; + + enum Associativity + { + LEFT_TO_RIGHT, + RIGHT_TO_LEFT + }; + + char token[4]; + unsigned precedence; + Type type; + Associativity assoc; + + static const Operator operators[]; +}; + struct NodeVisitor; struct Node