Пример #1
0
        public static void GenerateCode(LanguageNode root, string path)
        {
            var s = new Symbols(path);
            var generator = s.MainMethod.GetILGenerator();

            root.Generate(generator, s);
            generator.Emit(OpCodes.Ret);
            s.ProgramType.CreateType();
            s.Assembly.SetEntryPoint(s.MainMethod);
            s.Assembly.Save(s.AssemblyName.Name + ".exe");
        }
Пример #2
0
 protected LanguageNode(LanguageNode node)
     : base(node)
 {
 }