mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
30 lines
736 B
C#
30 lines
736 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Cosmos.Compiler.XSharp;
|
|
|
|
namespace XSharp.XSC {
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|