Commit Graph

8 Commits (a9b7016c71753c845031e1c13c160d5d33c9f07b)

Author SHA1 Message Date
Christopher Chedeau 8f26568bc8 Properly print comments for BinaryExpression (#494)
We don't call the generic print on the BinaryExpression itself, so we need to manually print those comments. It's going to be useful for my work on the MemberExpression :)
2017-01-27 14:03:44 -05:00
Christopher Chedeau 612574d02d Stop using conditionalGroup inside of UnionTypeAnnotation (#491)
It's actually not needed to use conditionalGroup as we can use ifBreak for it. I was able to do it just for cleanup and found out that it also fixed two of the bugs we have with comments. That's great :p

Fixes #485
Fixes #486
2017-01-26 21:41:50 -05:00
James Long eaddd4b3e6 Refactor comment algorithm and improve newline/spaces detection (fixes #483, #275, #135, #78, #36) (#482) 2017-01-26 11:57:43 -08:00
James Long 3aa267d5e8 Remove `multilineGroup` (#450) 2017-01-24 13:54:01 -05:00
Christopher Chedeau fb52e7a5c8 Do not put a newline on empty `{}` for functions (#447)
The original intent of it was for `if then else` and `try catch` as they aren't likely to be empty, but it accidentally caught function bodys, which have many valid reasons to be empty. Let's special case those out.
2017-01-24 12:37:01 -05:00
James Long cd2f7393ef Propagate breaks upwards automatically, introduce `breakParent`, and deprecate `multilineGroup` (#440) 2017-01-23 18:47:11 -05:00
James Long 6e57b7f2dd Print dangling comments in blocks (#331) 2017-01-19 14:46:37 -05:00
Christopher Chedeau 28e886aea1 Add tests for comments (#330)
This adds a snapshot test for all of the weird things I've seen happening with comments.
2017-01-19 14:28:40 -05:00