<commit_before>﻿namespace Crayon
{
	internal class Program
	{
		static void Main(string[] args)
		{
#if DEBUG
			string sourceFolder = @"C:\things\projects\Crayon\Demos\Volcano\source";
			string outputFolder = @"C:\things\projects\Crayon\Demos\Volcano\output";
			string rawPlatform = "js";
			bool minified = false;
			string jsFolderRoot = "";
			string outputReadableByteCode = null;
#else
			if (args.Length != 3 && args.Length != 4)
			{
				System.Console.WriteLine("Usage:");
				System.Console.WriteLine("  C:\\Things> crayon.exe sourcefolder outputfolder platform [jsfolderroot]");
				System.Console.WriteLine("Platforms:");
				foreach (string line in PLATFORM_USAGE)
				{
					System.Console.WriteLine(line);
					return;
				}
			}
			string sourceFolder = args[0];
			string outputFolder = args[1];
			string rawPlatform = args[2].ToLowerInvariant();
			string outputReadableByteCode = null; // TODO: expose this via a flag
			bool minified = false;
			string jsFolderRoot = "";
			if (args.Length == 4)
			{
				jsFolderRoot = args[3];
			}
#endif

			if (!System.IO.Directory.Exists(sourceFolder))
			{
				System.Console.WriteLine("Source folder could not be found.");
				return;
			}

			if (!System.IO.Directory.Exists(outputFolder))
			{
				System.Console.WriteLine("Output folder could not be found.");
				return;
			}

			AbstractPlatform platform;
			switch (rawPlatform.ToLowerInvariant())
			{
				//case "cswin": platform = new Crayon.Translator.CSharp.CSharpPlatform(); break;
				case "js": platform = new Crayon.Translator.JavaScript.JavaScriptPlatform(minified, jsFolderRoot); break;
				case "py": platform = new Crayon.Translator.Python.PythonPlatform(); break;
				default:
					System.Console.WriteLine("Platform must be one of the following:");
					foreach (string line in PLATFORM_USAGE)
					{
						System.Console.WriteLine(line);
					}
					return;
			}

			platform.Compile(sourceFolder, outputFolder, outputReadableByteCode);
		}

		private static readonly string[] PLATFORM_USAGE = new string[] {
			"  js - HTML/JavaScript",
			"  py - Python (with PyGame)",
			//"  cswin - C# (for Windows Client App)",
		};
	}
}<commit_msg>Uncomment out C# target in command line flags processor. Add commented-out Java target.<commit_after>﻿namespace Crayon
{
	internal class Program
	{
		static void Main(string[] args)
		{
#if DEBUG
			string sourceFolder = @"C:\things\projects\Crayon\Demos\Volcano\source";
			string outputFolder = @"C:\things\projects\Crayon\Demos\Volcano\output";
			string rawPlatform = "js";
			bool minified = false;
			string jsFolderRoot = "";
			string outputReadableByteCode = null;

#else
			if (args.Length != 3 && args.Length != 4)
			{
				System.Console.WriteLine("Usage:");
				System.Console.WriteLine("  C:\\Things> crayon.exe sourcefolder outputfolder platform [jsfolderroot]");
				System.Console.WriteLine("Platforms:");
				foreach (string line in PLATFORM_USAGE)
				{
					System.Console.WriteLine(line);
					return;
				}
			}
			string sourceFolder = args[0];
			string outputFolder = args[1];
			string rawPlatform = args[2].ToLowerInvariant();
			string outputReadableByteCode = null; // TODO: expose this via a flag
			bool minified = false;
			string jsFolderRoot = "";
			if (args.Length == 4)
			{
				jsFolderRoot = args[3];
			}
#endif

			if (!System.IO.Directory.Exists(sourceFolder))
			{
				System.Console.WriteLine("Source folder could not be found.");
				return;
			}

			if (!System.IO.Directory.Exists(outputFolder))
			{
				System.Console.WriteLine("Output folder could not be found.");
				return;
			}

			AbstractPlatform platform;
			switch (rawPlatform.ToLowerInvariant())
			{
				//case "java": platform = new Crayon.Translator.Java.JavaPlatform(); break;
				case "cswin": platform = new Crayon.Translator.CSharp.CSharpPlatform(); break;
				case "js": platform = new Crayon.Translator.JavaScript.JavaScriptPlatform(minified, jsFolderRoot); break;
				case "py": platform = new Crayon.Translator.Python.PythonPlatform(); break;
				default:
					System.Console.WriteLine("Platform must be one of the following:");
					foreach (string line in PLATFORM_USAGE)
					{
						System.Console.WriteLine(line);
					}
					return;
			}

			platform.Compile(sourceFolder, outputFolder, outputReadableByteCode);
		}

		private static readonly string[] PLATFORM_USAGE = new string[] {
			"  cswin - C# (for Windows Client App)",
			"  js - HTML/JavaScript",
			//"  java - Java (for Desktop)",
			"  py - Python (with PyGame)",
		};
	}
}
{'fraction_non_alphanumeric': 0.126679885437321, 'fraction_numerical': 0.0030843798193434676, 'mean_word_length': 3.43359375, 'pattern_counts': {'":': 7, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2816013', 'n_tokens_mistral': 1734, 'n_tokens_neox': 1384, 'n_words': 336}