Ejemplo n.º 1
0
 public void PrintAllTheNames()
 {
     try {
         PlayPen.PrintAllTheNames("..\\..\\Main\\LeMP.StdMacros");
     } catch {
     }
 }
Ejemplo n.º 2
0
 public static void PrintAllTheNames(string path)
 {
     using (ParsingService.PushCurrent(EcsLanguageService.Value))
         using (MessageSink.SetDefault(ConsoleMessageSink.Value))
             foreach (var filename in Directory.GetFiles(path, "*.cs"))
             {
                 Console.WriteLine(filename);
                 foreach (var stmt in EcsLanguageService.Value.ParseFile(filename))
                 {
                     stmt.ReplaceRecursive(node => {
                         var name = PlayPen.GetName(node);
                         if (name != null)
                         {
                             MessageSink.Default.Write(Severity.Note, node,
                                                       "Found {0} named {1}", node.Name, name);
                         }
                         return(null);                        // do not change anything
                     });
                 }
             }
 }