Rework deparenthesize-like methods

- Extract private `deparenthesizeOnce` and repeat it until get the same expression

- Drop redundant parameter `deparenthesizeRecursively`

- Drop some usages of `safeDeparenthesize` in `deparenthesize`
  because even if `deparenthesize` returns null (i.e. something was not parsed)
  there is no sense in working with such expressions

Note, that `deparenthesize` now unwraps nested labels' declaration (see changes in testData),
but it seems to be reasonable
This commit is contained in:
Denis Zharkov
2015-05-05 12:20:26 +03:00
parent b72a3de86e
commit 9101505eca
6 changed files with 38 additions and 19 deletions
@@ -1,4 +1,3 @@
// ERROR: The label '@OuterLoop1' does not denote a loop
public object TestClass {
public fun main(args: Array<String>) {
var i = 1