-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: better printing of
Pexp_extension
(#2814)
* fix: better printing of `Pexp_extension` * chore: add changelog entry
- Loading branch information
1 parent
a83a096
commit 20bd5ca
Showing
5 changed files
with
125 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* Extension with pexp_apply */ | ||
|
||
[%defer | ||
cleanup(); | ||
]; | ||
|
||
/* Extension with comment with pexp_apply */ | ||
|
||
[%defer | ||
/* 2. comment attached to expr in extension */ | ||
cleanup(); | ||
]; | ||
|
||
/* Let sequence + extension with pexp_apply */ | ||
|
||
let () = { | ||
/* random let binding */ | ||
let x = 1; | ||
/* 1. comment attached to extension */ | ||
[%defer cleanup()]; | ||
/* 3. comment attached to next expr */ | ||
something_else(); | ||
}; | ||
|
||
/* Let sequence + extension with comment with pexp_apply */ | ||
|
||
let () = { | ||
/* random let binding */ | ||
let x = 1; | ||
/* 1. comment attached to extension */ | ||
[%defer | ||
/* 2. comment attached to expr in extension */ | ||
cleanup() | ||
]; | ||
/* 3. comment attached to next expr */ | ||
something_else(); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
Format extensions | ||
$ refmt ./input.re | ||
/* Extension with pexp_apply */ | ||
|
||
[%defer cleanup()]; | ||
|
||
/* Extension with comment with pexp_apply */ | ||
|
||
[%defer | ||
/* 2. comment attached to expr in extension */ | ||
cleanup() | ||
]; | ||
|
||
/* Let sequence + extension with pexp_apply */ | ||
|
||
let () = { | ||
/* random let binding */ | ||
let x = 1; | ||
/* 1. comment attached to extension */ | ||
[%defer cleanup()]; | ||
/* 3. comment attached to next expr */ | ||
something_else(); | ||
}; | ||
|
||
/* Let sequence + extension with comment with pexp_apply */ | ||
|
||
let () = { | ||
/* random let binding */ | ||
let x = 1; | ||
/* 1. comment attached to extension */ | ||
[%defer | ||
/* 2. comment attached to expr in extension */ | ||
cleanup() | ||
]; | ||
/* 3. comment attached to next expr */ | ||
something_else(); | ||
}; |
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