ocamlformat icon indicating copy to clipboard operation
ocamlformat copied to clipboard

Do not use extension nodes for sugared extension forms

Open gpetiot opened this issue 3 years ago • 0 comments

Fix #2081

  • Preserves more of the sugared extension forms (wasn't the case when we formatted a function in an Apply when break-infix-before-func=false for example)
  • Behaves the same with/without extension (for example regarding module-item-spacing (only diff we get when running test_branch.sh))
  • Removes code duplication and the whole extension-node layer in Fmt_ast.ml and Ast.ml
  • Removes Source.extension_using_sugar that relied on the input anyway

gpetiot avatar Mar 17 '22 19:03 gpetiot