Exemple #1
0
 public static void TestSimpleParse()
 {
     Console.WriteLine("Testing parsing of mod w just func defs...");
     try {
         var parser = new Parser.Parser(exampleModule1);
         var ast    = parser.Ast();
         Console.WriteLine(ast);
     } catch (Parser.ParserException pe) {
         Console.WriteLine(pe.Message);
     }
     Console.WriteLine("Done testing parser...");
 }
Exemple #2
0
 public static void TestParseModuleHeader()
 {
     Console.WriteLine("Testing parsing of module header...");
     try {
         var parser = new Parser.Parser(exampleModule2);
         var ast    = parser.Ast();
         Console.WriteLine(ast);
     } catch (Parser.ParserException pe) {
         Console.WriteLine(pe.Message);
     }
     Console.WriteLine("Done testing parser...");
 }