-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print trivia of SynMatchClause #1357
Print trivia of SynMatchClause #1357
Conversation
@nojaf CI on 1st commit was broken because Humberto forgot to run fantomas on fantomas itself, but 2nd commit should have passed, however, the failure seems unrelated to this PR (something about paket...?). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @HumbertoCortes, thank you for this contribution.
Unfortunately, I'd like to see a different implementation.
Please let me know if you need further assistance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @HumbertoCortes, looks good.
Thanks for the requested changes.
I've tweaked some stuff here and there to work with the full range of SynMatchClause.
Related dotnet/fsharp#10877
Fixes #1219 |
The comments inside
with
block (of a try-with) are formatted. In the Clauses generation method ("genClause") a genTrivia call ("genTriviaMainNodesBeforeClausePipe") is inserted in the CodePrinter. The new method look for a trivia nodes with in TriviaMainNodes list.Two unit test are added to test the correct behaviour.