static void PrintFile(FileInfo file) { string fileName = file.FullName; //Console.WriteLine ("parsing {0}", fileName); Parser p = new Parser(); p.Parse (new Lexer (new FileReader (fileName))); if (p.Errors.count == 0) { ErrorVisitor ev = new ErrorVisitor(); ev.Visit(p.compilationUnit, null); } if (p.Errors.count == 0 && errorMode) { Console.WriteLine ("no errors in {0}", file.Name); } else if (p.Errors.count > 0 && !errorMode) { Console.WriteLine ("errors in {0}", file.Name); foreach (ErrorInfo error in p.Errors.ErrorInformation) Console.WriteLine (error.ToString ()); } }
public static bool ContainsError(ISymbol symbol) { return(_instance.Visit(symbol)); }
public static bool ContainsError(ISymbol symbol) => s_instance.Visit(symbol);