コード例 #1
0
 public virtual void OutAAmbiguousNameLvalue(AAmbiguousNameLvalue node)
 {
     DefaultOut(node);
 }
コード例 #2
0
 public virtual void CaseAAmbiguousNameLvalue(AAmbiguousNameLvalue node)
 {
     DefaultCase(node);
 }
コード例 #3
0
 public virtual void InAAmbiguousNameLvalue(AAmbiguousNameLvalue node)
 {
     DefaultIn(node);
 }
コード例 #4
0
        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")));
        }
コード例 #5
0
 public override void CaseAAmbiguousNameLvalue(AAmbiguousNameLvalue node)
 {
     InAAmbiguousNameLvalue(node);
     if (node.GetAmbiguous() != null)
     {
         node.GetAmbiguous().Apply(this);
     }
     OutAAmbiguousNameLvalue(node);
 }
コード例 #6
0
 ArrayList New583()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList3 = (ArrayList) Pop();
     ArrayList nodeArrayList2 = (ArrayList) Pop();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TypedList listNode6 = new TypedList();
     TypedList listNode5 = (TypedList)nodeArrayList1[0];
     if ( listNode5 != null )
     {
     listNode6.AddAll(listNode5);
     }
     AAName pnameNode4 = new AAName (
       listNode6
     );
     AAmbiguousNameLvalue plvalueNode3 = new AAmbiguousNameLvalue (
       pnameNode4
     );
     ALvalueExp pexpNode2 = new ALvalueExp (
       plvalueNode3
     );
     TArrow tarrowNode8 = (TArrow)nodeArrayList2[0];
     AArrowDotType pdottypeNode7 = new AArrowDotType (
       tarrowNode8
     );
     TIdentifier tidentifierNode9 = (TIdentifier)nodeArrayList3[0];
     AStructLvalue plvalueNode1 = new AStructLvalue (
       pexpNode2,
       pdottypeNode7,
       tidentifierNode9
     );
     nodeList.Add(plvalueNode1);
     return nodeList;
 }
コード例 #7
0
 ArrayList New594()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TypedList listNode4 = new TypedList();
     TypedList listNode3 = (TypedList)nodeArrayList1[0];
     if ( listNode3 != null )
     {
     listNode4.AddAll(listNode3);
     }
     AAName pnameNode2 = new AAName (
       listNode4
     );
     AAmbiguousNameLvalue plvalueNode1 = new AAmbiguousNameLvalue (
       pnameNode2
     );
     nodeList.Add(plvalueNode1);
     return nodeList;
 }
コード例 #8
0
 ArrayList New531()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList4 = (ArrayList) Pop();
     ArrayList nodeArrayList3 = (ArrayList) Pop();
     ArrayList nodeArrayList2 = (ArrayList) Pop();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TypedList listNode3 = new TypedList();
     TypedList listNode9 = new TypedList();
     TypedList listNode11 = new TypedList();
     TypedList listNode13 = new TypedList();
     TConst tconstNode2 = (TConst)nodeArrayList1[0];
     TypedList listNode7 = new TypedList();
     TypedList listNode6 = (TypedList)nodeArrayList2[0];
     if ( listNode6 != null )
     {
     listNode7.AddAll(listNode6);
     }
     AAName pnameNode5 = new AAName (
       listNode7
     );
     AAmbiguousNameLvalue plvalueNode4 = new AAmbiguousNameLvalue (
       pnameNode5
     );
     TypedList listNode10 = (TypedList)nodeArrayList3[0];
     if ( listNode10 != null )
     {
     listNode11.AddAll(listNode10);
     }
     TypedList listNode12 = (TypedList)nodeArrayList4[0];
     if ( listNode12 != null )
     {
     listNode13.AddAll(listNode12);
     }
     AShadySAssignmentExp pexpNode1 = new AShadySAssignmentExp (
       tconstNode2,
       listNode3,
       plvalueNode4,
       null,
       listNode9,
       listNode11,
       listNode13
     );
     nodeList.Add(pexpNode1);
     return nodeList;
 }
コード例 #9
0
 ArrayList New532()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList7 = (ArrayList) Pop();
     ArrayList nodeArrayList6 = (ArrayList) Pop();
     ArrayList nodeArrayList5 = (ArrayList) Pop();
     ArrayList nodeArrayList4 = (ArrayList) Pop();
     ArrayList nodeArrayList3 = (ArrayList) Pop();
     ArrayList nodeArrayList2 = (ArrayList) Pop();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TypedList listNode3 = new TypedList();
     TypedList listNode10 = new TypedList();
     TypedList listNode12 = new TypedList();
     TypedList listNode14 = new TypedList();
     TConst tconstNode2 = (TConst)nodeArrayList1[0];
     TypedList listNode7 = new TypedList();
     TypedList listNode6 = (TypedList)nodeArrayList2[0];
     if ( listNode6 != null )
     {
     listNode7.AddAll(listNode6);
     }
     AAName pnameNode5 = new AAName (
       listNode7
     );
     AAmbiguousNameLvalue plvalueNode4 = new AAmbiguousNameLvalue (
       pnameNode5
     );
     TLt tltNode8 = (TLt)nodeArrayList3[0];
     TypedList listNode9 = (TypedList)nodeArrayList4[0];
     if ( listNode9 != null )
     {
     listNode10.AddAll(listNode9);
     }
     TypedList listNode11 = (TypedList)nodeArrayList6[0];
     if ( listNode11 != null )
     {
     listNode12.AddAll(listNode11);
     }
     TypedList listNode13 = (TypedList)nodeArrayList7[0];
     if ( listNode13 != null )
     {
     listNode14.AddAll(listNode13);
     }
     AShadySAssignmentExp pexpNode1 = new AShadySAssignmentExp (
       tconstNode2,
       listNode3,
       plvalueNode4,
       tltNode8,
       listNode10,
       listNode12,
       listNode14
     );
     nodeList.Add(pexpNode1);
     return nodeList;
 }
コード例 #10
0
 ArrayList New509()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList3 = (ArrayList) Pop();
     ArrayList nodeArrayList2 = (ArrayList) Pop();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TAssign tassignNode2 = (TAssign)nodeArrayList2[0];
     TypedList listNode6 = new TypedList();
     TypedList listNode5 = (TypedList)nodeArrayList1[0];
     if ( listNode5 != null )
     {
     listNode6.AddAll(listNode5);
     }
     AAName pnameNode4 = new AAName (
       listNode6
     );
     AAmbiguousNameLvalue plvalueNode3 = new AAmbiguousNameLvalue (
       pnameNode4
     );
     PExp pexpNode7 = (PExp)nodeArrayList3[0];
     AAssignmentExp pexpNode1 = new AAssignmentExp (
       tassignNode2,
       plvalueNode3,
       pexpNode7
     );
     nodeList.Add(pexpNode1);
     return nodeList;
 }
コード例 #11
0
 ArrayList New470()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList2 = (ArrayList) Pop();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TypedList listNode5 = new TypedList();
     TypedList listNode4 = (TypedList)nodeArrayList2[0];
     if ( listNode4 != null )
     {
     listNode5.AddAll(listNode4);
     }
     AAName pnameNode3 = new AAName (
       listNode5
     );
     AAmbiguousNameLvalue plvalueNode2 = new AAmbiguousNameLvalue (
       pnameNode3
     );
     TMinusMinus tminusminusNode7 = (TMinusMinus)nodeArrayList1[0];
     APreDecIncDecOp pincdecopNode6 = new APreDecIncDecOp (
       tminusminusNode7
     );
     AIncDecExp pexpNode1 = new AIncDecExp (
       plvalueNode2,
       pincdecopNode6
     );
     nodeList.Add(pexpNode1);
     return nodeList;
 }
コード例 #12
0
 ArrayList New422()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TypedList listNode5 = new TypedList();
     TypedList listNode4 = (TypedList)nodeArrayList1[0];
     if ( listNode4 != null )
     {
     listNode5.AddAll(listNode4);
     }
     AAName pnameNode3 = new AAName (
       listNode5
     );
     AAmbiguousNameLvalue plvalueNode2 = new AAmbiguousNameLvalue (
       pnameNode3
     );
     ALvalueExp pexpNode1 = new ALvalueExp (
       plvalueNode2
     );
     nodeList.Add(pexpNode1);
     return nodeList;
 }
コード例 #13
0
 ArrayList New380()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList6 = (ArrayList) Pop();
     ArrayList nodeArrayList5 = (ArrayList) Pop();
     ArrayList nodeArrayList4 = (ArrayList) Pop();
     ArrayList nodeArrayList3 = (ArrayList) Pop();
     ArrayList nodeArrayList2 = (ArrayList) Pop();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TypedList listNode11 = new TypedList();
     TypedList listNode6 = new TypedList();
     TypedList listNode5 = (TypedList)nodeArrayList1[0];
     if ( listNode5 != null )
     {
     listNode6.AddAll(listNode5);
     }
     AAName pnameNode4 = new AAName (
       listNode6
     );
     AAmbiguousNameLvalue plvalueNode3 = new AAmbiguousNameLvalue (
       pnameNode4
     );
     ALvalueExp pexpNode2 = new ALvalueExp (
       plvalueNode3
     );
     TDot tdotNode8 = (TDot)nodeArrayList2[0];
     ADotDotType pdottypeNode7 = new ADotDotType (
       tdotNode8
     );
     TIdentifier tidentifierNode9 = (TIdentifier)nodeArrayList3[0];
     TypedList listNode10 = (TypedList)nodeArrayList5[0];
     if ( listNode10 != null )
     {
     listNode11.AddAll(listNode10);
     }
     ANonstaticInvokeExp pexpNode1 = new ANonstaticInvokeExp (
       pexpNode2,
       pdottypeNode7,
       tidentifierNode9,
       listNode11
     );
     nodeList.Add(pexpNode1);
     return nodeList;
 }
コード例 #14
0
 ArrayList New336()
 {
     ArrayList nodeList = new ArrayList();
     ArrayList nodeArrayList4 = (ArrayList) Pop();
     ArrayList nodeArrayList3 = (ArrayList) Pop();
     ArrayList nodeArrayList2 = (ArrayList) Pop();
     ArrayList nodeArrayList1 = (ArrayList) Pop();
     TLBracket tlbracketNode2 = (TLBracket)nodeArrayList2[0];
     TypedList listNode7 = new TypedList();
     TypedList listNode6 = (TypedList)nodeArrayList1[0];
     if ( listNode6 != null )
     {
     listNode7.AddAll(listNode6);
     }
     AAName pnameNode5 = new AAName (
       listNode7
     );
     AAmbiguousNameLvalue plvalueNode4 = new AAmbiguousNameLvalue (
       pnameNode5
     );
     ALvalueExp pexpNode3 = new ALvalueExp (
       plvalueNode4
     );
     PExp pexpNode8 = (PExp)nodeArrayList3[0];
     AArrayLvalue plvalueNode1 = new AArrayLvalue (
       tlbracketNode2,
       pexpNode3,
       pexpNode8
     );
     nodeList.Add(plvalueNode1);
     return nodeList;
 }