Commit graph

7 commits

Author SHA1 Message Date
Nick Cameron
7a758ea20a Fix closures again (#937)
* Fix closures again

Closes #934

Oh god, the rules for parsing closures are even more messed up than I thought - whether or not there is an inner block or depends not only on if there are braces, but also if there is a return type for the closure (!) and if there are statements in the block.

* Fix overflow
2016-04-15 10:52:08 +02:00
Nick Cameron
c7780fdfd8 Be careful about where we change braces in closures
And some general refactoring of closure code.

Fixes #863
2016-04-14 09:05:42 +12:00
Marcus Klaas
ffa7e8d599 Prevent generation of bogus comment in some function calls
This would happen when the callee contained parentheses.
2015-09-12 14:31:51 +02:00
Marcus Klaas
582aa4f2fe Format closures' return types 2015-09-08 20:56:33 +02:00
Marcus Klaas
c8fd23ca68 Refactor closure formatting routine 2015-08-20 23:05:41 +02:00
Marcus Klaas
a75017e50e Add additional tests for closures 2015-08-20 22:08:51 +02:00
Marcus Klaas
5fcd313b08 Format closures 2015-08-19 23:15:56 +02:00