Skip to content

Commit cba0e62

Browse files
committed
doc await for module
1 parent 2592542 commit cba0e62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

res_syntax/src/res_printer.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,11 @@ and printModuleBinding ~state ~isRec moduleBinding cmtTbl i =
710710
Doc.concat [Doc.text ": "; printModType ~state modType cmtTbl] )
711711
| modExpr -> (printModExpr ~state modExpr cmtTbl, Doc.nil)
712712
in
713+
let modExprDoc =
714+
if ParsetreeViewer.hasAwaitAttribute moduleBinding.pmb_expr.pmod_attributes
715+
then Doc.concat [Doc.text "await "; modExprDoc]
716+
else modExprDoc
717+
in
713718
let modName =
714719
let doc = Doc.text moduleBinding.pmb_name.Location.txt in
715720
printComments doc cmtTbl moduleBinding.pmb_name.loc

0 commit comments

Comments
 (0)