onevcat/VVDocumenter-Xcode — pull request #20 by idpaterson (2013-10-15 13:06:59+00:00)
Title: NS_ENUM and NS_OPTIONS formatting fixes

This pull request fixes a few issues in documenting enumerations. Some were introduced after the addition of slash prefixes and some were already there prior to that change. The changes are best described with examples:

#### NS_OPTIONS syntax

```objc
typedef NS_OPTIONS(NSUInteger, SampleEnum) {
SampleValue1,
SampleValue2
};
```

#### Before

```objc
/**
* <#Description#>
*/
typedef NS_OPTIONS(NSUInteger, SampleEnum) {
SampleValue1,
SampleValue2
};
```

#### After

```objc
/**
* <#Description#>
*/
typedef NS_OPTIONS(NSUInteger, SampleEnum) {
/**
* <#Description#>
*/
SampleValue1,
/**
* <#Description#>
*/
SampleValue2
};
```

### Opening brace on separate line

```objc
typedef NS_ENUM(NSUInteger, SampleEnum)
{
SampleValue1,
SampleValue2
};
```

#### Before

```objc
/**
* <#Description#>
*/
typedef NS_ENUM(NSUInteger, SampleEnum)
{
SampleValue1,
SampleValue2
};
```

#### After

```objc
/**
* <#Description#>
*/
typedef NS_ENUM(NSUInteger, SampleEnum)
{
/**
* <#Description#>
*/
SampleValue1,
/**
* <#Description#>
*/
SampleValue2
};
```

### Excess newlines in enum

```objc
typedef NS_ENUM(NSUInteger, SampleEnum) {

SampleValue1,

SampleValue2

};
```

#### Before

```objc
/**
* <#Description#>
*/
typedef NS_ENUM(NSUInteger, SampleEnum) {
/**
* <#Description#>
*/

SampleValue1,
/**
* <#Description#>
*/

SampleValue2
};
```

#### After

```objc
/**
* <#Description#>
*/
typedef NS_ENUM(NSUInteger, SampleEnum) {
/**
* <#Description#>
*/
SampleValue1,
/**
* <#Description#>
*/
SampleValue2
};
```

### Slash Prefix

```objc
typedef NS_ENUM(NSUInteger, SampleEnum) {
SampleValue1,
SampleValue2
};
```

#### Before

```objc
/// <#Description#>

typedef NS_ENUM(NSUInteger, SampleEnum) {
/// <#Description#>

SampleValue1,
/// <#Description#>

SampleValue2
};
```

#### After

```objc
/// <#Description#>
typedef NS_ENUM(NSUInteger, SampleEnum) {
/// <#Description#>
SampleValue1,
/// <#Description#>
SampleValue2
};
```