/// <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); }
/// <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); }
/// <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); }
public override string ToString() { return(_node != null?_node.ToString() : String.Empty); }