]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/syntax.h
Record assignment targets more precisely
[libs/gl.git] / source / glsl / syntax.h
index c3eeb6a14c7c244cea696bab9508f0d0bdc50012..3976af56aa77c97b2a8f430daa89514004209628 100644 (file)
@@ -230,9 +230,27 @@ struct BinaryExpression: Expression
 
 struct Assignment: BinaryExpression
 {
+       struct Target
+       {
+               enum ChainType
+               {
+                       MEMBER = 0x40,
+                       SWIZZLE = 0x80,
+                       ARRAY = 0xC0
+               };
+
+               Statement *declaration;
+               Msp::UInt8 chain_len;
+               Msp::UInt8 chain[7];
+
+               Target(Statement * = 0);
+
+               bool operator<(const Target &) const;
+       };
+
        bool self_referencing;
 
-       VariableDeclaration *target_declaration;
+       Target target;
 
        Assignment();
        Assignment(const Assignment &);