Пример #1
0
 private string FindSelfNames()
 {
     if (Body is SuiteStatement stmts)
     {
         foreach (Statement stmt in stmts.Statements)
         {
             if (stmt is FunctionDefinition def && def.Name == "__init__")
             {
                 return(string.Join(",", SelfNameFinder.FindNames(def)));
             }
         }
     }
     return(string.Empty);
 }
Пример #2
0
        private string FindSelfNames()
        {
            SuiteStatement stmts = Body as SuiteStatement;

            if (stmts == null)
            {
                return("");
            }

            foreach (Statement stmt in stmts.Statements)
            {
                if (stmt is FunctionDefinition def && def.Name == "__init__")
                {
                    return(string.Join(",", SelfNameFinder.FindNames(def)));
                }
            }
            return("");
        }