Пример #1
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            if (Visibility != CppVisibility.Default)
            {
                builder.Append(Visibility.ToString().ToLowerInvariant());
                builder.Append(" ");
            }

            builder.Append("enum ");
            if (IsScoped)
            {
                builder.Append("class ");
            }

            builder.Append(Name);

            if (IntegerType != null && !(IntegerType is CppPrimitiveType primitive && primitive.Kind == CppPrimitiveKind.Int))
            {
                builder.Append(": ");
                builder.Append(IntegerType.GetDisplayName());
            }

            builder.Append(" {...}");
            return(builder.ToString());
        }