if (left instanceof FullNameNode)
{
// Left-hand side is a "full name", for example: "ns1::ns2::member".
// Then convert the "full name" node into a namespace qualifier,
// and associate it with the variable.
final QualifiedNamespaceExpressionNode qualifier = new QualifiedNamespaceExpressionNode((FullNameNode)left);
result = new NamespaceAccessExpressionNode(qualifier, op, right);
}
else if (left instanceof MemberAccessExpressionNode)
{
// In this case, we need to turn the right side into the full qualified bit.
IExpressionNode maRight = ((MemberAccessExpressionNode)left).getRightOperandNode();
if (maRight instanceof NamespaceIdentifierNode)
{
((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode((NamespaceIdentifierNode)maRight, op, right));
}
else if (maRight instanceof IdentifierNode)
{
((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new NamespaceIdentifierNode((IdentifierNode)maRight), op, right));
//this is the @ case, so @x::y
}
else if (maRight instanceof UnaryOperatorNodeBase && ((UnaryOperatorNodeBase)maRight).getOperator() == OperatorType.AT)
{
((UnaryOperatorNodeBase)maRight).setExpression(new NamespaceAccessExpressionNode((IdentifierNode)((UnaryOperatorNodeBase)maRight).getOperandNode(), op, right));
}
if (maRight.hasParenthesis() && maRight instanceof MemberAccessExpressionNode)
{
((MemberAccessExpressionNode)left).setRightOperandNode(new NamespaceAccessExpressionNode(new QualifiedNamespaceExpressionNode((MemberAccessExpressionNode)maRight), op, right));
}
result = left;
}
else if (left instanceof NamespaceIdentifierNode &&
right instanceof IdentifierNode &&