mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
38 lines
976 B
C#
38 lines
976 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Cosmos.Assembler;
|
|
|
|
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);
|
|
}
|
|
//var xAsm = new Assembler();
|
|
//var xStreamReader= new StringReader("ESI[0] = $00");
|
|
//var xResult = xGenerator.Generate(xStreamReader);
|
|
//Console.WriteLine("done");
|
|
} catch (Exception ex) {
|
|
Console.WriteLine(ex.ToString());
|
|
Environment.Exit(1);
|
|
}
|
|
}
|
|
}
|
|
}
|