Closed lessp closed 1 month ago
/// comment
behind the scene is a standalone annotation.
This is the same as:
@genType
@@someStandaloneAnnotation
let make = () => ()
so @genType
is not attached to make
.
One could give an error in such a situation.
But there's no good code it could reformat to.
(because there's nothing to attach @genType
to in the parse tree)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Stumbled upon a couple of cases while trying to figure out how to get doc-strings to work.
First example
The formatter will turn this:
Into this:
Second example
The formatter will turn:
Into this:
Third example (might be the desired result)
The formatter will turn:
Into this:
Reproduce
Click format in the following example:
https://rescript-lang.org/try?version=v10.1.2&code=AIcwpgdgKgngDmAUAegFToAQAkwBtcD2ANBgOoEBOuAJhqsormAC4YC2AhgNZgYC8GABQBKfgD4hwxIjYFqAVyYYAYgQIAuDAG9EGDKEiwEujGmx5CJclVr0TTVpx6b5EAJas+E1x8QBffm17FnZuXgERcUkMf2kDaHgkZGTzfGIyShpGEKdw6K9JRCA