-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve comment placement after a `then` or `else` Allow comments on the same line as `then` and `else`, as it was the case in 0.26.2. Also, make sure to avoid formatting any code after a comment in that position. This was broken since #2507. * Preserve placement of comments after a `then` or `else` To avoid generating a large number of diffs, the locations of then and else keywords are added to the AST. This new information is used to preserve different cases: if cond then (* attached to then *) expr; if cond then (* attached to expr *) expr; if cond then (* attached to expr *) expr;
- Loading branch information
Showing
30 changed files
with
475 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Warning: tests/break_string_literals.ml:4 exceeds the margin | ||
Warning: tests/break_string_literals.ml:7 exceeds the margin | ||
Warning: tests/break_string_literals.ml:11 exceeds the margin | ||
Warning: tests/break_string_literals.ml:48 exceeds the margin | ||
Warning: tests/break_string_literals.ml:51 exceeds the margin | ||
Warning: tests/break_string_literals.ml:63 exceeds the margin | ||
Warning: tests/break_string_literals.ml:68 exceeds the margin | ||
Warning: tests/break_string_literals.ml:3 exceeds the margin | ||
Warning: tests/break_string_literals.ml:6 exceeds the margin | ||
Warning: tests/break_string_literals.ml:10 exceeds the margin | ||
Warning: tests/break_string_literals.ml:47 exceeds the margin | ||
Warning: tests/break_string_literals.ml:50 exceeds the margin | ||
Warning: tests/break_string_literals.ml:62 exceeds the margin | ||
Warning: tests/break_string_literals.ml:67 exceeds the margin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.