millermedeiros/esformatter — pull request #70 by jzaefferer (2013-08-19 10:10:36+00:00)
Title: WIP: Format SwitchStatement. Fix for #42

Currently adds indent.SwitchStatement, whiteSpace.*.SwitchDiscriminantOpening and whiteSpace.*.SwitchDiscriminantClosing.

Has various issues with nested statements and comments.

To illustrate those issues:

Input/expected:

```js
call(function(){
switch (fruit) {
// case comment
case Fruit.APPLE:
// consequent comment
exotic();
break;
default:
unknown();
}
});
```

Output/actual, based on the code in this PR:

```js
call(function(){
switch (fruit) {
// case comment
case Fruit.APPLE:
// consequent comment
exotic();
break;
default:
unknown();
}
});
```

The consequents are indented on level too much, the comments indentation is broken.