fantomas icon indicating copy to clipboard operation
fantomas copied to clipboard

Comments in SynArgPats.NamePatPairs are lost

Open nojaf opened this issue 2 years ago • 0 comments

Issue created from fantomas-online

Code

let examineData x =
    match data with
    | OnePartData( // foo
        part1 = p1
      (* bar *) ) -> p1
    | TwoPartData(part1 = p1; part2=p2) -> p1 + p2

Result

let examineData x =
    match data with
    | OnePartData (part1 = p1) -> p1
    | TwoPartData (part1 = p1; part2 = p2) -> p1 + p2

Problem description

The parentheses are not part of the tree. It would be nice if we had trivia for these.

Extra information

  • [ ] The formatted result breaks my code.
  • [ ] The formatted result gives compiler warnings.
  • [ ] I or my company would be willing to help fix this.

Options

Fantomas main branch at 2022-10-01T16:49:25Z - af5c23f3fa640739c3cfe28f47846cd833de6bb3

Default Fantomas configuration

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

nojaf avatar Oct 01 '22 17:10 nojaf