mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-21 05:18:38 +00:00
X#
This commit is contained in:
parent
209fa30b00
commit
4d69dcde01
2 changed files with 10 additions and 25 deletions
|
|
@ -97,10 +97,10 @@ namespace Cosmos.Compiler.XSharp {
|
|||
}
|
||||
|
||||
protected void AddPatterns() {
|
||||
AddPattern(new TokenType[] { TokenType.LiteralAsm },
|
||||
AddPattern("! Move EAX, 0",
|
||||
"new LiteralAssemblerCode(\"{0}\");"
|
||||
);
|
||||
AddPattern(new TokenType[] { TokenType.Comment },
|
||||
AddPattern("# Comment",
|
||||
"new Comment(\"{0}\");"
|
||||
);
|
||||
AddPattern("Label:" ,
|
||||
|
|
@ -205,20 +205,11 @@ namespace Cosmos.Compiler.XSharp {
|
|||
mPatterns.Add(new TokenPattern(aPattern), aCode);
|
||||
}
|
||||
|
||||
protected void AddPattern(TokenType[] aPattern, CodeFunc aCode) {
|
||||
mPatterns.Add(new TokenPattern(aPattern), aCode);
|
||||
}
|
||||
|
||||
protected void AddPattern(string aPattern, string aCode) {
|
||||
AddPattern(aPattern, delegate(TokenList aTokens, ref List<string> rCode) {
|
||||
rCode.Add(aCode);
|
||||
});
|
||||
}
|
||||
|
||||
protected void AddPattern(TokenType[] aPattern, string aCode) {
|
||||
AddPattern(aPattern, delegate(TokenList aTokens, ref List<string> rCode) {
|
||||
rCode.Add(aCode);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,19 +3,13 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace XSharpCompilerTester
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
namespace XSharpCompilerTester {
|
||||
static class Program {
|
||||
[STAThread]
|
||||
static void Main() {
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue