Exemplo n.º 1
0
        /// <summary>
        /// Returns the string representation of this node or token, not including its leading and trailing
        /// trivia.
        /// </summary>
        /// <returns>
        /// The string representation of this node or token, not including its leading and trailing trivia.
        /// </returns>
        /// <remarks>The length of the returned string is always the same as Span.Length</remarks>
        public override string ToString()
        {
            if (_token != null)
            {
                return(_token.ToString());
            }

            if (_nodeOrParent != null)
            {
                return(_nodeOrParent.ToString());
            }

            return(string.Empty);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Returns the string representation of this trivia. If this trivia is structured trivia then the returned string
 /// will not include any leading or trailing trivia present on the StructuredTriviaSyntax node of this trivia.
 /// </summary>
 /// <returns>The string representation of this trivia.</returns>
 /// <remarks>The length of the returned string is always the same as Span.Length</remarks>
 public override string ToString()
 {
     return(triviaNode != null?triviaNode.ToString() : string.Empty);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns the string representation of this token, not including its leading and trailing trivia.
 /// </summary>
 /// <returns>The string representation of this token, not including its leading and trailing trivia.</returns>
 /// <remarks>The length of the returned string is always the same as Span.Length</remarks>
 public override string ToString()
 {
     return(token != null?token.ToString() : string.Empty);
 }
Exemplo n.º 4
0
 public override string ToString()
 {
     return(_node != null?_node.ToString() : String.Empty);
 }