Пример #1
0
 public override void CaseAEnrichmentDecl(AEnrichmentDecl node)
 {
     InAEnrichmentDecl(node);
     {
         Object[] temp = new Object[node.GetDecl().Count];
         node.GetDecl().CopyTo(temp, 0);
         for (int i = temp.Length - 1; i >= 0; i--)
         {
             ((PDecl)temp[i]).Apply(this);
         }
     }
     if (node.GetType() != null)
     {
         node.GetType().Apply(this);
     }
     if (node.GetEndToken() != null)
     {
         node.GetEndToken().Apply(this);
     }
     if (node.GetIntDim() != null)
     {
         node.GetIntDim().Apply(this);
     }
     if (node.GetDimention() != null)
     {
         node.GetDimention().Apply(this);
     }
     if (node.GetToken() != null)
     {
         node.GetToken().Apply(this);
     }
     OutAEnrichmentDecl(node);
 }
Пример #2
0
            public static AMethodDecl CreateNewObjectMethod(Node node, AEnrichmentDecl enrichmentDecl, SharedData data)
            {
                if (createEnrichmentMethod.ContainsKey(enrichmentDecl))
                    return createEnrichmentMethod[enrichmentDecl];

                createEnrichmentMethod[enrichmentDecl] = CreateNewObjectMethodP(node, enrichmentDecl.GetIntDim(),
                                                                        Util.TypeToIdentifierString(enrichmentDecl.GetType()),
                                                                        CreateEnrichmentFields(node, enrichmentDecl, data), data);

                return createEnrichmentMethod[enrichmentDecl];
            }
Пример #3
0
 public static AMethodDecl CreateDeleteEnrichmentMethodGlobalArray(Node node, AEnrichmentDecl enrichmentDecl, SharedData data)
 {
     deleteEnrichmentMethod[enrichmentDecl] = CreateDeleteStructMethodGlobalArrayP(node, enrichmentDecl.GetIntDim(),
                                                                           Util.TypeToIdentifierString(enrichmentDecl.GetType()),
                                                                           CreateEnrichmentFields(node,
                                                                                              enrichmentDecl,
                                                                                              data), data);
     return deleteEnrichmentMethod[enrichmentDecl];
 }
Пример #4
0
            public static GlobalStructVars CreateEnrichmentFields(Node node, AEnrichmentDecl enrichmentDecl, SharedData data)
            {
                if (EnrichmentFields.ContainsKey(enrichmentDecl))
                    return EnrichmentFields[enrichmentDecl];

                EnrichmentFields[enrichmentDecl] = CreatePointerFields(node, enrichmentDecl.GetIntDim(),
                                                                       Util.TypeToIdentifierString(
                                                                           enrichmentDecl.GetType()),
                                                                       Util.MakeClone(enrichmentDecl.GetType(), data), data);
                return EnrichmentFields[enrichmentDecl];
            }
Пример #5
0
            public static AMethodDecl CreateDeleteEnrichmentMethod(Node node, AEnrichmentDecl enrichmentDecl, SharedData data)
            {
                if (deleteEnrichmentMethod.ContainsKey(enrichmentDecl))
                    return deleteEnrichmentMethod[enrichmentDecl];

                if (enrichmentDecl.GetIntDim() == null)
                    return CreateDeleteObjectMethod(node, data);
                return CreateDeleteEnrichmentMethodGlobalArray(node, enrichmentDecl, data);
            }