/// <summary> /// Align all the wrapped parts of the expression with the token after 'return'. /// That way we get: /// /// return a == obj.a && /// b == obj.b && /// ... /// </summary> public override void AddIndentBlockOperations( List <IndentBlockOperation> list, SyntaxNode node, OptionSet optionSet, NextAction <IndentBlockOperation> nextOperation) { if (_syntaxFacts.IsReturnStatement(node)) { var expr = _syntaxFacts.GetExpressionOfReturnStatement(node); if (expr?.ChildNodesAndTokens().Count > 1) { list.Add(FormattingOperations.CreateRelativeIndentBlockOperation( expr.GetFirstToken(), expr.GetFirstToken().GetNextToken(), node.GetLastToken(), indentationDelta: 0, option: IndentBlockOption.RelativePosition)); return; } } nextOperation.Invoke(list); }