public static void Validate(SemanticModel semanticModel, IDiagnosticWriter diagnosticWriter) { var visitor = new IntegerValidatorVisitor(semanticModel, diagnosticWriter); // visiting writes diagnostics in some cases visitor.Visit(semanticModel.SourceFile.ProgramSyntax); }
public static void Validate(ProgramSyntax programSyntax, IDiagnosticWriter diagnosticWriter) { var visitor = new IntegerValidatorVisitor(diagnosticWriter); // visiting writes diagnostics in some cases visitor.Visit(programSyntax); }