CodeEmitor.save C# (CSharp) Method

save() public method

public save ( ) : void
return void
    public void save()
    {
        AsmBuilder.SetEntryPoint(m_mainClass.GetMethod("Main"), PEFileKinds.ConsoleApplication);
        AsmBuilder.Save(m_fileName);
    }

Usage Example

示例#1
0
    public static void Main(string[] args)
    {
        try {
            if (args.Length < 1) {
                System.Console.WriteLine("Usage : JSMinus file");
                return;
            }

            ICharStream input = new ANTLRFileStream(args[0]);
            JSMinusLexer lexer = new JSMinusLexer(input);
            CommonTokenStream tokens = new CommonTokenStream(lexer);
            JSMinusParser parser = new JSMinusParser(tokens);
            CodeEmitor emitor = new CodeEmitor("JSMinus", parser.program());
            emitor.save();
            emitor.run();

        } catch (System.Exception e) {
            Console.Error.WriteLine(e.StackTrace);
            Console.Error.WriteLine("Exception: " + e);
        }
    }
All Usage Examples Of CodeEmitor::save