Well, the tool we are going to use is "Microsoft Visual C#" and download it in the Internet if you didn't have it yet.
Well, I am playing the codes just to put the following codes:
Step 1: Creating a console application project
1. Go to File -> New Project.
2. Make sure you click "Console Application" and name whatever you want.
3. Click OK.
step 2: start typing the codes to create the project!
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Eagle_Script
{
class Program
{
static void Main(string[] args)
{
}
}
}
Add these codes just below "using System.Text;":
using System.Reflection;
using System.Reflection.Emit;
Below the second "{" which is just above the "static void Main(string[] args)", put in these codes:
static AssemblyBuilder ab;
static ModuleBuilder mb;
static TypeBuilder tb;
static _AppDomain ad;
static MethodBuilder meb;
static ILGenerator il;
an = new AssemblyName("lol");
ab = ad.DefineDynamicAssembly(an, AssemblyBuilderAccess.Save);
mb = ab.DefineDynamicModule("Lol", "idk.exe");
meb = tb.DefineMethod("main", MethodAttributes.Public | MethodAttributes.Static);
il = meb.GetILGenerator();
an.Name = "MyApp";
ab.SetEntryPoint(meb);
StreamReader sr = new StreamReader(args[0]);
string Code = sr.ReadToEnd();
//The codes below is the creation of our own syntax in its own command.
foreach (string cmd in Code.Split('\n'))
{
if (cmd.StartsWith("print"))
{
il.Emit(OpCodes.Ldstr, cmd.Substring(6));
il.Emit(OpCodes.Call, typeof(System.Console).GetMethod("Write", new System.Type[] { typeof(string) }));
}
if (cmd.StartsWith("println"))
{
il.Emit(OpCodes.Ldstr, cmd.Substring(8));
il.Emit(OpCodes.Call, typeof(System.Console).GetMethod("WriteLine", new System.Type[] { typeof(string) }));
{
}
}
il.Emit(OpCodes.Ret);
tb.CreateType();
ab.Save(Path.GetFileNameWithoutExtension(args[0]) + ".exe");
STEP 3: PUBLISH THE PROGRAMMING LANGUAGE
step 4: test it!
print World
println Lol!