예제 #1
0
            private static void Report(SyntaxTreeAnalysisContext context, SyntaxTriviaList list, bool isEof)
            {
                list.Pairs(TriviaFilter)
                .ForEach(p => context.ReportDiagnostic(Diagnostic.Create(Rule, p.Item1.GetLocation())));

                if (isEof)
                {
                    var lastTravis = list[list.Count - 1];
                    if (lastTravis.IsKind(SyntaxKind.WhitespaceTrivia))
                    {
                        context.ReportDiagnostic(Diagnostic.Create(Rule, lastTravis.GetLocation()));
                    }
                }
            }