Ejemplo n.º 1
0
        /// <summary>
        /// Compiles source code into intermediate representation that is accessible through the parser.
        /// </summary>
        /// <param name="context"></param>
        public void Compile(CompilerContext context)
        {
            parser = new BasicParser(context);
            parser.Parse();

#if DEBUG
            //Just for debugging
            GlobalRootNamespace root = parser.GlobalNamespace;
#endif
        }
Ejemplo n.º 2
0
        private static void parserTest()
        {
            header();
            
            var cu = new SourceUnit();
            cu.Add("Tests/helloworld.vb");

            var context = new CompilerContext();

            try
            {
                var parser = new BasicParser(context);
                parser.Parse();
            }
            catch (Exception e)
            {
                Console.WriteLine("{0}\n", e);
            }
            finally
            {
                printErrors(context.Report);
            }
        }