File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -5783,7 +5783,22 @@ and parseFunctorModuleExpr p =
5783
5783
* | extension
5784
5784
* | attributes module-expr *)
5785
5785
and parseModuleExpr p =
5786
+ let hasAwait, loc_await =
5787
+ let startPos = p.startPos in
5788
+ match p.Parser. token with
5789
+ | Await ->
5790
+ Parser. expect Await p;
5791
+ let endPos = p.endPos in
5792
+ (true , mkLoc startPos endPos)
5793
+ | _ -> (false , mkLoc startPos startPos)
5794
+ in
5786
5795
let attrs = parseAttributes p in
5796
+ let attrs =
5797
+ if hasAwait then
5798
+ (({txt = " res.await" ; loc = loc_await}, PStr [] ) : Parsetree. attribute)
5799
+ :: attrs
5800
+ else attrs
5801
+ in
5787
5802
let modExpr =
5788
5803
if isEs6ArrowFunctor p then parseFunctorModuleExpr p
5789
5804
else parsePrimaryModExpr p
You can’t perform that action at this time.
0 commit comments