/// <summary> /// Normalizes the specified node's white space. /// </summary> /// <typeparam name="TNode">The type of node to normalize.</typeparam> /// <param name="node">The node to normalize.</param> /// <returns>The normalized node.</returns> public static TNode Normalize <TNode>(TNode node) where TNode : SyntaxNode { var normalizer = new SyntaxNormalizer(); return((TNode)normalizer.Visit(node)); }
/// <summary> /// Creates a new syntax tree based on the specified syntax tree which has normalized white space. /// </summary> /// <typeparam name="TSyntax">The type of node on which this operation is being performed.</typeparam> /// <param name="this">The node which represents the root of the syntax tree to normalize.</param> /// <returns>The node which is at the root of the normalized syntax tree.</returns> public static TSyntax NormalizeWhitespace <TSyntax>(this TSyntax @this) where TSyntax : SyntaxNode { return(SyntaxNormalizer.Normalize(@this)); }