protected virtual void GenerateBinaryOperatorExpression(CodeBinaryOperatorExpression e)
{
bool indentedExpression = false;
Output.Write('(');
GenerateExpression(e.Left);
Output.Write(' ');
if (e.Left is CodeBinaryOperatorExpression || e.Right is CodeBinaryOperatorExpression)
{
// In case the line gets too long with nested binary operators, we need to output them on
// different lines. However we want to indent them to maintain readability, but this needs
// to be done only once;
if (!_inNestedBinary)
{
indentedExpression = true;
_inNestedBinary = true;
Indent += 3;
}
ContinueOnNewLine("");
}
OutputOperator(e.Operator);
Output.Write(' ');
GenerateExpression(e.Right);
Output.Write(')');
if (indentedExpression)
{
Indent -= 3;
_inNestedBinary = false;
}
}