Exemplo n.º 1
0
        public static Parser GetParser(LOLProgram prog, string filename, Stream s, CompilerResults results)
        {
            Parser p = new Parser(new Scanner(s));
            p.filename = Path.GetFileName(filename);
            p.errors = new Errors(results.Errors);
            p.globals = prog.globals;

            return p;
        }
Exemplo n.º 2
0
        public static Parser GetParser(LOLProgram prog, string filename, Stream s, CompilerResults results)
        {
            Parser p = new Parser(new Scanner(s));

            p.filename = Path.GetFileName(filename);
            p.errors   = new Errors(results.Errors);
            p.globals  = prog.globals;

            return(p);
        }
Exemplo n.º 3
0
        public static Parser GetParser(ModuleBuilder mb, LOLProgram prog, string filename, Stream s, CompilerResults cr) {
            Parser p = new Parser(new Scanner(s));
            p.filename = Path.GetFileName(filename);
            if (prog.compileropts.IncludeDebugInformation)
            {
                p.doc = mb.DefineDocument(p.filename, Guid.Empty, Guid.Empty, Guid.Empty);
            }
            else
            {
                //Not a debug build
                p.doc = null;
            }

            p.program = prog;
            p.errors = new Errors(cr.Errors);
            p.main = prog.methods["Main"];

            return p;
        }
Exemplo n.º 4
0
        public static Parser GetParser(ModuleBuilder mb, LOLProgram prog, string filename, Stream s, CompilerResults cr)
        {
            Parser p = new Parser(new Scanner(s));

            p.filename = Path.GetFileName(filename);
            if (prog.compileropts.IncludeDebugInformation)
            {
                p.doc = mb.DefineDocument(p.filename, Guid.Empty, Guid.Empty, Guid.Empty);
            }
            else
            {
                //Not a debug build
                p.doc = null;
            }

            p.program = prog;
            p.errors  = new Errors(cr.Errors);
            p.main    = prog.methods["Main"];

            return(p);
        }