当前位置: 首页>>代码示例>>C#>>正文


C# CSsemi.CSemiExp.Add方法代码示例

本文整理汇总了C#中CSsemi.CSemiExp.Add方法的典型用法代码示例。如果您正苦于以下问题:C# CSsemi.CSemiExp.Add方法的具体用法?C# CSsemi.CSemiExp.Add怎么用?C# CSsemi.CSemiExp.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSsemi.CSemiExp的用法示例。


在下文中一共展示了CSsemi.CSemiExp.Add方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: test

        public override bool test(CSsemi.CSemiExp semi, string file)
        {
            try
            {
                List<Elem> output = OutputRepository.output_;
                foreach (Elem e in output)
                {
                    for (int i = 0; i < semi.count; i++)
                    {
                        if (semi[i].Equals(e.name) && (semi[i + 2].Equals(";")) && (e.type.Equals("class") || e.type.Equals("enum") || e.type.Equals("struct")))
                        {

                            if (semi[i - 1].Equals("(") || semi[i - 1].Equals("new"))
                            {
                                return false;
                            }
                            CSsemi.CSemiExp local = new CSsemi.CSemiExp();
                            // create local semiExp with tokens for type and name
                            local.displayNewLines = false;
                            local.Add("Composition").Add(semi[i]);
                            doActions(local, file);
                            return true;
                        }
                    }
                }

            }
            catch
            {

            }
            return false;
        }
开发者ID:WaverV,项目名称:Projects,代码行数:33,代码来源:RulesAndActions.cs

示例2: inhertanceTest

        private void inhertanceTest(CSsemi.CSemiExp semi, int index, string filename)
        {
            CSsemi.CSemiExp local = new CSsemi.CSemiExp();
            CSsemi.CSemiExp local1 = new CSsemi.CSemiExp();
            local.displayNewLines = false;
            local1.displayNewLines = false;

            if ((semi[index + 2].Equals(":")))
            {
                foreach (Elem check in table)
                {
                    if (check.name.Equals(semi[index + 3]))
                    {
                        local.Add(semi[index]).Add("Inheritance").Add(semi[index + 1]).Add(semi[index + 3]).Add(check.filename).Add(check.namespacename);
                        doActions(local, filename);
                        break;
                    }
                }
            }
            if ((semi[index + 2].Equals(":")) && (semi[index + 4].Equals(",")))
            {
                foreach (Elem check in table)
                {
                    if (check.name.Equals(semi[index + 5]))
                    {
                        local1.Add(semi[index]).Add("Inheritance").Add(semi[index + 1]).Add(semi[index + 5]).Add(check.filename).Add(check.namespacename);
                        doActions(local1, filename);
                        break;
                    }
                }
            }
        }
开发者ID:sunilkumarlakkad,项目名称:Dependency-Analyzer,代码行数:32,代码来源:RulesAndActions.cs

示例3: test

 public override bool test(CSsemi.CSemiExp semi, string filename)
 {
     List<Elem> table = RepositoryForOutput.storageForOutput_;
     CSsemi.CSemiExp local = new CSsemi.CSemiExp();
     try
     {
         for (int i = 0; i < semi.count; i++)
         {
             foreach (Elem e in table)
             {
                 if ((e.name.Equals(semi[i])) && ((e.type.Equals("struct")) || (e.type.Equals("enum"))) && !(e.type.Equals("function")) && (semi[i + 2].Equals(";")))
                 {
                     local.Add("Composition").Add(semi[i]).Add(e.filename).Add(e.namespacename);
                     doActions(local, filename);
                     return true;
                 }
             }
         }
     }
     catch
     {
     }
     return false;
 }
开发者ID:sunilkumarlakkad,项目名称:Dependency-Analyzer,代码行数:24,代码来源:RulesAndActions.cs

示例4: test

        public override bool test(CSsemi.CSemiExp semi, string filename)
        {
            if (semi[semi.count - 1] != "{")
                return false;

            int index = semi.FindFirst("(");
            if (index > 0 && !isSpecialToken(semi[index - 1]))
            {
                CSsemi.CSemiExp local = new CSsemi.CSemiExp();
                local.Add("function").Add(semi[index - 1]);
                doActions(local, filename);
                return true;
            }
            return false;
        }
开发者ID:sunilkumarlakkad,项目名称:Code-Analyzer,代码行数:15,代码来源:RulesAndActions.cs

示例5: test

 public override bool test(CSsemi.CSemiExp semi)
 {
     int indexEN = semi.Contains("enum");
       if (indexEN != -1)
       {
       CSsemi.CSemiExp local = new CSsemi.CSemiExp();
       local.displayNewLines = false;
       local.Add(semi[indexEN]).Add(semi[indexEN + 1]);
       doActions(local);
       return true;
       }
       return false;
 }
开发者ID:bizarreWizard,项目名称:code_analyzer_engine,代码行数:13,代码来源:RulesAndActions.cs

示例6: test

        public override bool test(CSsemi.CSemiExp semi)
        {
            if (semi[semi.count - 1] != "{")
            return false;

              // strip off leading #if(TEST_XYZ) if it's in this semi

              if (semi.FindFirst("#") != -1)
              {
            int loc = semi.FindFirst(")");
            for (int i = 0; i <= loc; ++i)
              semi.remove(0);
              }
              // now find function

              int index = semi.FindFirst("(");
              if (index > 0 && !isSpecialToken(semi[index - 1]))
              {
            CSsemi.CSemiExp local = new CSsemi.CSemiExp();
            local.Add("function").Add(semi[index - 1]);
            doActions(local);
            return true;
              }
              return false;
        }
开发者ID:mukund24,项目名称:Source-Code-Publisher,代码行数:25,代码来源:RulesAndActions.cs

示例7: test

        public override bool test(CSsemi.CSemiExp semi)
        {
            Repository repo_ = Repository.getInstance();
            int index = semi.FindFirst("new");
            if (index != -1)
            {
                string currclassName = DetectParentClass.getClassName(repo_.semi.lineCount);
                CSsemi.CSemiExp local = new CSsemi.CSemiExp();
                // local semiExp with tokens for type and name
                local.displayNewLines = false;
                local.Add(semi[index + 1]).Add(semi[index - 2]).Add(currclassName);
                doActionsAggregation(local);
                return true;
            }

            return false;
        }
开发者ID:prmk,项目名称:DependencyAnalyzer,代码行数:17,代码来源:RulesAndActions.cs

示例8: test

 public override bool test(CSsemi.CSemiExp semi)
 {
     Display.displayRules(actionDelegate, "rule   DetectNamespace");
       int index = semi.Contains("namespace");
       if (index != -1)
       {
     CSsemi.CSemiExp local = new CSsemi.CSemiExp();
     // create local semiExp with tokens for type and name
     local.displayNewLines = false;
     local.Add(semi[index]).Add(semi[index + 1]);
     doActions(local);
     return true;
       }
       return false;
 }
开发者ID:bizarreWizard,项目名称:dependency_analyzer,代码行数:15,代码来源:RulesAndActions.cs

示例9: test

 public override bool test(CSsemi.CSemiExp semi)
 {
   int index = semi.Contains("namespace");
   if (index != -1)
   {
     CSsemi.CSemiExp local = new CSsemi.CSemiExp();
     local.displayNewLines = false;
     local.Add(semi[index]).Add(semi[index + 1]);
     doActions(local);
   }
   return false;
 }
开发者ID:Logeshkumar,项目名称:Projects,代码行数:12,代码来源:Parser.cs

示例10: scopeToSemi

 private CSsemi.CSemiExp scopeToSemi(Stack scope)
 {
   object[] StrArr = scope.ToArray();
   CSsemi.CSemiExp local = new CSsemi.CSemiExp();
   foreach (object str in StrArr)
     local.Add((string)str);
   return local;
 }
开发者ID:Logeshkumar,项目名称:Projects,代码行数:8,代码来源:Parser.cs

示例11: doAction

        public override void doAction(CSsemi.CSemiExp semi, string filename)
        {
            Elem elem;
            try
            {
                elem = repo_.stack.pop();
                for (int i = 0; i < repo_.locations.Count; ++i)
                {
                    Elem temp = repo_.locations[i];
                    if (elem.type == temp.type)
                    {
                        if (elem.name == temp.name)
                        {
                            if ((repo_.locations[i]).end == 0)
                            {
                                (repo_.locations[i]).end = repo_.semi.lineCount;
                                elem.end = repo_.semi.lineCount;
                                break;
                            }
                        }
                    }
                }
            }
            catch
            {
                Console.Write("popped empty stack on semiExp: ");
                semi.display();
                return;
            }
            CSsemi.CSemiExp local = new CSsemi.CSemiExp();
            local.Add(elem.type).Add(elem.name);
            if (local[0] == "control")
                return;

            if (AAction.displaySemi)
            {
                Console.Write("\n  line# {0,-5}", repo_.semi.lineCount);
                Console.Write("leaving  ");
                string indent = new string(' ', 2 * (repo_.stack.count + 1));
                Console.Write("{0}", indent);
                this.display(local); // defined in abstract action
            }
        }
开发者ID:sunilkumarlakkad,项目名称:Code-Analyzer,代码行数:43,代码来源:RulesAndActions.cs

示例12: test

        public override bool test(CSsemi.CSemiExp semi)
        {
            int indexDl = semi.Contains("delegate");

              if (indexDl != -1)
              {
              CSsemi.CSemiExp local = new CSsemi.CSemiExp();
              // local semiExp with tokens for type and name
              local.displayNewLines = false;
              local.Add(semi[indexDl]).Add(semi[indexDl+ 2]);
              doActions(local);
              return true;
              }
              return false;
        }
开发者ID:DhivyaNarayanan,项目名称:CodeAnalyzer,代码行数:15,代码来源:RulesAndActions.cs

示例13: aggregationTest

 private void aggregationTest(CSsemi.CSemiExp semi, int index, string filename, string filenameto, string namespacename)
 {
     CSsemi.CSemiExp local = new CSsemi.CSemiExp();
     if ((semi[index + 2].Equals(".")))
     {
         local.Add("Aggregation").Add(semi[index + 3]).Add(semi[index - 2]).Add(filenameto).Add(namespacename);
         doActions(local, filename);
     }
     else
     {
         local.Add("Aggregation").Add(semi[index + 1]).Add(semi[index - 2]).Add(filenameto).Add(namespacename);
         doActions(local, filename);
     }
 }
开发者ID:sunilkumarlakkad,项目名称:Dependency-Analyzer,代码行数:14,代码来源:RulesAndActions.cs


注:本文中的CSsemi.CSemiExp.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。