Skip to content

Comments in SynArgPats.NamePatPairs are lost #2541

@nojaf

Description

@nojaf

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 - af5c23f

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions