private void WriteCompositeType(CompositeType type)
        {
            // Writing type declaration
            WriteLine(type.GetDeclarationLine());
            WriteLine("{");
            IndentLevel++;

            if (type is ClassType)
            {
                foreach (TypeBase nestedType in ((ClassType)type).NestedChilds)
                {
                    WriteType(nestedType);
                    AddBlankLine();
                }
            }

            if (type.SupportsFields)
            {
                foreach (Field field in type.Fields)
                {
                    WriteField(field);
                }
            }

            bool needBlankLine = (type.FieldCount > 0 && type.OperationCount > 0);

            foreach (Operation operation in type.Operations)
            {
                if (needBlankLine)
                {
                    AddBlankLine();
                }
                needBlankLine = true;

                WriteOperation(operation);
            }

            // Writing closing bracket of the type block
            IndentLevel--;
            WriteLine("}");
        }
        private void WriteCompositeType(CompositeType type)
        {
            // Writing type declaration
            WriteLine(type.GetDeclarationLine() + " {");
            AddBlankLine();
            IndentLevel++;

            if (type is ClassType)
            {
                foreach (TypeBase nestedType in ((ClassType)type).NestedChilds)
                {
                    WriteType(nestedType);
                    AddBlankLine();
                }
            }

            if (type.FieldCount > 0)
            {
                foreach (Field field in type.Fields)
                {
                    WriteField(field);
                }
                AddBlankLine();
            }

            if (type.OperationCount > 0)
            {
                foreach (Method method in type.Operations)
                {
                    WriteMethod(method);
                    AddBlankLine();
                }
            }

            // Writing closing bracket of the type block
            IndentLevel--;
            WriteLine("}");
        }