The PrettyPrinter knows nothing about the ForEach construct. It does neither validate the expressions, nor create the appropriate TextBlocks.