Keep attributes in front of a labeled parameter alias when formatting
Why
The parser puts attributes written before ~a as x on the alias pattern, and the formatter printed them after as, where they parse onto the inner pattern, so formatting changed the AST (#9101). Doc comments in that position were printed between as and the pattern.
modifiedFormat labeled parameter alias
let g = (@attr ~a as x: int) => xlet h = (/** a */ ~a as x: int=3) => x
rescript
Before
After
let g = (~a as @attr x: int) => xlet g = (@attr ~a as x: int) => xlet h = (let h = ( ~a as /** a */ x: int=3, /** a */ ~a as x: int=3,) => x) => x