}
+Swizzle::Swizzle():
+ count(0)
+{
+ fill(components, components+4, 0);
+}
+
+void Swizzle::visit(NodeVisitor &visitor)
+{
+ visitor.visit(*this);
+}
+
+
void UnaryExpression::visit(NodeVisitor &visitor)
{
visitor.visit(*this);
Assignment::Assignment():
- self_referencing(false),
- target_declaration(0)
+ self_referencing(false)
{ }
Assignment::Assignment(const Assignment &other):
BinaryExpression(other),
- self_referencing(other.self_referencing),
- target_declaration(0)
+ self_referencing(other.self_referencing)
{ }
void Assignment::visit(NodeVisitor &visitor)
}
+Assignment::Target::Target(Statement *d):
+ declaration(d),
+ chain_len(0)
+{
+ fill(chain, chain+7, 0);
+}
+
+bool Assignment::Target::operator<(const Target &other) const
+{
+ if(declaration!=other.declaration)
+ return declaration<other.declaration;
+ for(unsigned i=0; (i<7 && i<chain_len && i<other.chain_len); ++i)
+ if(chain[i]!=other.chain[i])
+ return chain[i]<other.chain[i];
+ return chain_len<other.chain_len;
+}
+
+
FunctionCall::FunctionCall():
constructor(false),
declaration(0)
name(other.name),
parameters(other.parameters),
body(other.body),
+ signature(other.signature),
definition(other.definition==&other ? this : 0),
return_type_declaration(0)
{ }