Cosmos/source/Compiler/Cosmos.XSharp/Program.cs
kudzu_cp b65c31dcec
2014-07-14 15:01:59 +00:00

29 lines
710 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace XSharp.Compiler {
class Program {
static void Main(string[] aArgs) {
try {
string xSrc = aArgs[0];
var xGenerator = new AsmGenerator();
string[] xFiles;
if (Directory.Exists(xSrc)) {
xFiles = Directory.GetFiles(xSrc, "*.xs");
} else {
xFiles = new string[] { xSrc };
}
foreach (var xFile in xFiles) {
xGenerator.GenerateToFiles(xFile);
}
} catch (Exception ex) {
Console.WriteLine(ex.Message);
Environment.Exit(1);
}
}
}
}