public override bool Walk(GroupingOperator node) { if (node != null) { if (node.Operand != null) { node.Operand.Walk(this); } } return(false); }
public override bool Walk(GroupingOperator node) { AddNode(node); return true; }
public override bool Walk(GroupingOperator node) { if (node != null) { if (node.Operand != null) { node.Operand.Walk(this); } } return false; }
public override bool Walk(GroupingOperator node) { ReplaceFollowingWhiteSpace( node.GetStartIndex(_tree.LocationResolver) + 1, _options.SpaceAfterOpeningAndBeforeClosingNonEmptyParenthesis ? " " : "" ); if (node.Operand != null) { node.Operand.Walk(this); } // Format the indentation of the block along with whitespace. bool isMultiLine = ContainsLineFeed(node.GetStartIndex(_tree.LocationResolver), node.GetEndIndex(_tree.LocationResolver)); if (isMultiLine && node.Operand == null) { ReplacePreceedingIncludingNewLines(node.GetEndIndex(_tree.LocationResolver) - 1, ReplaceWith.InsertNewLineAndIndentation, replaceOnNewLine: true); } else { ReplacePreceedingWhiteSpace( node.GetEndIndex(_tree.LocationResolver) - 1, _options.SpaceAfterOpeningAndBeforeClosingNonEmptyParenthesis ? " " : "" ); } return false; }