mdr/scalariform — Issue #43: Add ability to format combinator parsers
Author: tomlanning
Created: 2012-01-11 15:34:09+00:00
State: open

The formatting provided by (Align single-line case statements) is useful, thank-you. It would be nice to have similar formatting for single line combinator parsers (e.g., align the trailing transform definition " ... ^^ { ... }").

For example,

```scala
def rule1 = rep(rule2) ^^ { _.mkString }
def rule2 = '0' | '1' | '2' | '3' | '4' ^^ { _.toSomething }
```

could become,

```scala
def rule1 = rep(rule2) ^^ { _.mkString }
def rule2 = '0' | '1' | '2' | '3' | '4' ^^ { _.toSomething }
```

Might be possible to make this more general and align selected operators in adjacent lines.