/// <summary> /// Gets all the semantic diagnostics unsorted. Does not include parser and lexer diagnostics. /// </summary> /// <returns></returns> public IReadOnlyList <Diagnostic> GetSemanticDiagnostics() { var diagnosticWriter = ToListDiagnosticWriter.Create(); var visitor = new SemanticDiagnosticVisitor(diagnosticWriter); visitor.Visit(this.Root); var typeValidationDiagnostics = typeManager.GetAllDiagnostics(); diagnosticWriter.WriteMultiple(typeValidationDiagnostics); return(diagnosticWriter.GetDiagnostics()); }
/// <summary> /// Gets all the semantic diagnostics unsorted. Does not include parser and lexer diagnostics. /// </summary> /// <returns></returns> public IEnumerable <Diagnostic> GetSemanticDiagnostics() { var diagnostics = new List <Diagnostic>(); var visitor = new SemanticDiagnosticVisitor(diagnostics); visitor.Visit(this.Root); var typeValidationDiagnostics = typeManager.GetAllDiagnostics(); diagnostics.AddRange(typeValidationDiagnostics); return(diagnostics); }
/// <summary> /// Gets all the semantic diagnostics unsorted. Does not include parser and lexer diagnostics. /// </summary> /// <returns></returns> public IEnumerable <Diagnostic> GetSemanticDiagnostics() { var diagnostics = new List <Diagnostic>(); var visitor = new SemanticDiagnosticVisitor(diagnostics); visitor.Visit(this.Root); var typeValidationDiagnostics = TypeValidationVisitor.GetTypeValidationDiagnostics(bindings, typeManager, this.Root.Syntax); diagnostics.AddRange(typeValidationDiagnostics); // TODO: Remove this when we fix IL limitations var emitLimitationVisitor = new EmitLimitationVisitor(diagnostics, this); emitLimitationVisitor.Visit(this.Root.Syntax); return(diagnostics); }