예제 #1
0
        internal static void Compile(string assemblyName, string outputFileName, string sourceCode)
        {
            var assembly = new BFAssembly(assemblyName, outputFileName);

            var memory = new BFMemory(assembly.MainTypeBuilder);

            MethodBuilder mainMethod = assembly.MainTypeBuilder.DefineMethod("Execute", MethodAttributes.Public | MethodAttributes.Static);

            GenerateMainMethod(mainMethod, memory, sourceCode);
            assembly.SetEntryPoint(mainMethod);
            assembly.BuildToFile();
        }
예제 #2
0
        internal static void Compile(string assemblyName, string outputFileName, string sourceCode)
        {
            var assembly = new BFAssembly(assemblyName, outputFileName);

            var memory = new BFMemory(assembly.MainTypeBuilder);

            MethodBuilder mainMethod = assembly.MainTypeBuilder.DefineMethod("Execute", MethodAttributes.Public | MethodAttributes.Static);

            GenerateMainMethod(mainMethod, memory, sourceCode);
            assembly.SetEntryPoint(mainMethod);
            assembly.BuildToFile();
        }