public override void CaseAAmbiguousNameLvalue(AAmbiguousNameLvalue node)
 {
     InAAmbiguousNameLvalue(node);
     if (node.GetAmbiguous() != null)
     {
         node.GetAmbiguous().Apply(this);
     }
     OutAAmbiguousNameLvalue(node);
 }
        public override void OutAAmbiguousNameLvalue(AAmbiguousNameLvalue node)
        {
            if (node.Parent() is ADelegateExp)
                return;//Handle in delegate
            if (node.Parent().Parent() is ANonstaticInvokeExp && ((ANonstaticInvokeExp)node.Parent().Parent()).GetReceiver() == node.Parent())
                return;//Handle in nonstatic invoke
            if (node.Parent() is ASyncInvokeExp && ((ASyncInvokeExp)node.Parent()).GetName() == node)
                return;
            if (node.Parent() is AAsyncInvokeStm && ((AAsyncInvokeStm)node.Parent()).GetName() == node)
                return;
            //Transform AAmbigiousNameLvalue.

            List<List<Node>>[] targets;
            List<ANamespaceDecl> namespaces = new List<ANamespaceDecl>();
            bool reportedError;

            AAName aName = (AAName) node.GetAmbiguous();
            GetTargets(aName, out targets, namespaces, data, errors, out reportedError, false);

            if (reportedError)
                return;

            for (int i = 0; i < targets.Length; i++)
            {
                if (targets[i].Count == 0)
                    continue;
                if (targets[i].Count > 1)
                {
                    List<ErrorCollection.Error> subErrors = new List<ErrorCollection.Error>();
                    foreach (List<Node> list in targets[i])
                    {
                        subErrors.Add(GetErrorPath(list));
                    }
                    errors.Add(new ErrorCollection.Error(aName.GetToken(), LocRM.GetString("ErrorText173"), false, subErrors.ToArray()));
                    return;
                }
                PLvalue replacer = Link(aName, node, targets[i][0], data);
                node.ReplaceBy(replacer);
                replacer.Apply(this);
                return;
            }
            errors.Add(new ErrorCollection.Error(aName.GetToken(), LocRM.GetString("ErrorText175")));
        }