Пример #1
0
 private static void FormatClosingBrace(NodeMember.IAstList members, StringBuilder sb, string indent, bool isMultiLineNode)
 {
     if (!isMultiLineNode)
     {
         sb.Append(" }");
     }
     else
     {
         sb.Append(indent + "}");
     }
 }
Пример #2
0
        private void FormatMembers(NodeMember.IAstList members, StringBuilder sb, string indent, bool isMultiLineNode)
        {
            foreach (var member in members)
            {
                FormatMember(member, sb, isMultiLineNode ? indent : "");

                if (isMultiLineNode)
                {
                    sb.AppendLine();
                }
            }
        }
Пример #3
0
 private static void FormatOpeningBrace(NodeMember.IAstList members, StringBuilder sb, string indent, bool isMultiLineNode)
 {
     if (!isMultiLineNode)
     {
         sb.Append(" { ");
     }
     else if (AmmySettings.OpeningBraceOnSameLine)
     {
         sb.Append(" {" + Environment.NewLine);
     }
     else
     {
         sb.Append(Environment.NewLine + indent + "{" + Environment.NewLine);
     }
 }