Exemplo n.º 1
0
        public override void VisitToken(Microsoft.CodeAnalysis.SyntaxToken token)
        {
            var indents = new String(' ', tabs * tabWidth);

            if (_configurationOptions.DisplayFormattedOutput)
            {
                Messages.AppendLine(string.Format("Token:{0}{1}:>{2}<", indents,
                                                  _configurationOptions.DisplayNodeKind ? token.Kind().ToString() : "",
                                                  _configurationOptions.DisplayNodeValue ? token.ToString() : ""));
            }
            else
            {
                Messages.AppendLine(string.Format("Token:{0}:>{1}<",
                                                  _configurationOptions.DisplayNodeKind ? token.Kind().ToString() : "",
                                                  _configurationOptions.DisplayNodeValue ? token.ToString() : ""));
            }

            // Call base to visit children

            base.VisitToken(token);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets a list of all the diagnostics associated with the token and any related trivia.
 /// This method does not filter diagnostics based on #pragmas and compiler options
 /// like nowarn, warnaserror etc.
 /// </summary>
 public abstract IEnumerable <Diagnostic> GetDiagnostics(SyntaxToken token);