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


C# CSsemi.FindFirst方法代码示例

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


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

示例1: 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

示例2: test

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

            List<Elem> table = RepositoryForOutput.storageForOutput_;
            CSsemi.CSemiExp local = new CSsemi.CSemiExp();
            try
            {
                if (index > 0 && !isSpecialToken(semi[index - 1]))
                {
                    for (int i = index - 1; i < semi.count; i++)
                    {
                        foreach (Elem e in table)
                        {
                            if ((e.name.Equals(semi[i])) && !(e.type.Equals("function")) && !(e.type.Equals("namespace")))
                            {
                                local.Add("Using").Add(semi[i]).Add(e.filename).Add(e.namespacename);
                                doActions(local, filename);
                                return false;
                            }
                        }
                    }
                }
            }
            catch
            {
            }
            return false;
        }
开发者ID:sunilkumarlakkad,项目名称:Dependency-Analyzer,代码行数:31,代码来源:RulesAndActions.cs

示例3: containFunctionName

 // wether the semi contain name of function
 bool containFunctionName(CSsemi.CSemiExp semi)
 {
     if (semi[semi.count - 1] == "{")  // found "{"
       {
       int index = semi.FindFirst("(");
       if (index > 0 && !DetectFunction.isSpecialToken(semi[index - 1]))    // and found "(" before "{" and at least a token before "("
           return true;
       else
           return false;
       }
       else
       return false;
 }
开发者ID:bizarreWizard,项目名称:code_analyzer_engine,代码行数:14,代码来源:RulesAndActions.cs

示例4: 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

示例5: 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

示例6: test

        public override bool test(CSsemi.CSemiExp semi)
        {
            Display.displayRules(actionDelegate, "rule   DetectFunction");
              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);
            return true;
              }
              return false;
        }
开发者ID:bizarreWizard,项目名称:dependency_analyzer,代码行数:16,代码来源:RulesAndActions.cs

示例7: test

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

                int index = semi.FindFirst("(");
                if (index > 0 && !isSpecialToken(semi[index - 1]))
                {
                    List<Elem> output = OutputRepository.output_;

                    foreach (Elem e in output)
                    {
                        for (int i = 0; i < semi.count - 1; i++)
                        {
                            if (e.name.Equals(semi[i]) && !e.type.Equals("namespace") && !e.type.Equals("function"))
                            {
                                CSsemi.CSemiExp local = new CSsemi.CSemiExp();
                                local.Add("Using").Add(semi[i]);
                                doActions(local, file);
                                return true;
                            }

                        }
                    }

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

示例8: test

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

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


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