Parse a doc comment before a function parameter
Why
The formatter prints @res.doc on a parameter as a doc comment, which the parser rejected, so formatting broke a file that compiled.
modifiedAST doc comment on a parameter
let f = (/**The runner*/ run: string) => rundiagnostic
I'm not sure what to parse here when looking at "DocComment The runner".parse
pattern├─ attribute "res.doc"│ └─ structure_item│ ├─ Pstr_eval│ └─ expression│ └─ Pexp_constant PConst_string (source="The runner", semantic="The runner")├─ Ppat_constraint├─ pattern│ └─ Ppat_var "run"└─ core_type └─ Ptyp_constr "string"
modifiedFormat doc comment on a parameter
let f = (@res.doc("The runner") run: string) => runrescript
let f = ( /**The runner*/ run: string,) => run
Fixes #8994