Exemplo n.º 1
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);
            }
        }
        private static SourceUnit makeCU(SourceFile[] files)
        {
            var unit = new SourceUnit();

            foreach (SourceFile file in files)
            {
                unit.Add(file);
            }

            return unit;
        }