@@ -49873,9 +49873,9 @@ let filterParsingAttrs attrs =
49873
49873
match attr with
49874
49874
| ( {
49875
49875
Location.txt =
49876
- ( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "ns.namedArgLoc"
49877
- | "res.optional " | "res.ternary " | "res.async " | "res.await "
49878
- | "res.template" );
49876
+ ( "bs" | "res.uapp" | "res.braces" | "res.iflet"
49877
+ | "res.namedArgLoc " | "res.optional " | "res.ternary " | "res.async "
49878
+ | "res.await" | "res. template" );
49879
49879
},
49880
49880
_ ) ->
49881
49881
false
@@ -50723,7 +50723,7 @@ let getLoc node =
50723
50723
| CoreType ct -> ct.ptyp_loc
50724
50724
| ExprArgument expr -> (
50725
50725
match expr.Parsetree.pexp_attributes with
50726
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _attrs ->
50726
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _attrs ->
50727
50727
{loc with loc_end = expr.pexp_loc.loc_end}
50728
50728
| _ -> expr.pexp_loc)
50729
50729
| Expression e -> (
@@ -51731,7 +51731,7 @@ and walkExpression expr t comments =
51731
51731
let open Parsetree in
51732
51732
let startPos =
51733
51733
match pattern.ppat_attributes with
51734
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _attrs ->
51734
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _attrs ->
51735
51735
loc.loc_start
51736
51736
| _ -> pattern.ppat_loc.loc_start
51737
51737
in
@@ -51790,7 +51790,7 @@ and walkExprPararameter (_attrs, _argLbl, exprOpt, pattern) t comments =
51790
51790
51791
51791
and walkExprArgument expr t comments =
51792
51792
match expr.Parsetree.pexp_attributes with
51793
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _attrs ->
51793
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _attrs ->
51794
51794
let leading, trailing = partitionLeadingTrailing comments loc in
51795
51795
attach t.leading loc leading;
51796
51796
let afterLabel, rest = partitionAdjacentTrailing loc trailing in
@@ -52198,7 +52198,7 @@ and walkTypeParameters typeParameters t comments =
52198
52198
visitListButContinueWithRemainingComments
52199
52199
~getLoc:(fun (_, _, typexpr) ->
52200
52200
match typexpr.Parsetree.ptyp_attributes with
52201
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _attrs ->
52201
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _attrs ->
52202
52202
{loc with loc_end = typexpr.ptyp_loc.loc_end}
52203
52203
| _ -> typexpr.ptyp_loc)
52204
52204
~walkNode:walkTypeParameter ~newlineDelimited:false typeParameters t
@@ -55147,7 +55147,7 @@ and printTypeParameter ~state (attrs, lbl, typ) cmtTbl =
55147
55147
in
55148
55148
let loc, typ =
55149
55149
match typ.ptyp_attributes with
55150
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: attrs ->
55150
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: attrs ->
55151
55151
( {loc with loc_end = typ.ptyp_loc.loc_end},
55152
55152
{typ with ptyp_attributes = attrs} )
55153
55153
| _ -> (typ.ptyp_loc, typ)
@@ -57433,7 +57433,7 @@ and printJsxProps ~state args cmtTbl : Doc.t * Parsetree.expression option =
57433
57433
] ->
57434
57434
let loc =
57435
57435
match expr.Parsetree.pexp_attributes with
57436
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _attrs ->
57436
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _attrs ->
57437
57437
{loc with loc_end = expr.pexp_loc.loc_end}
57438
57438
| _ -> expr.pexp_loc
57439
57439
in
@@ -57469,7 +57469,7 @@ and printJsxProp ~state arg cmtTbl =
57469
57469
| ( ((Asttypes.Labelled lblTxt | Optional lblTxt) as lbl),
57470
57470
{
57471
57471
Parsetree.pexp_attributes =
57472
- [({Location.txt = "ns .namedArgLoc"; loc = argLoc}, _)];
57472
+ [({Location.txt = "res .namedArgLoc"; loc = argLoc}, _)];
57473
57473
pexp_desc = Pexp_ident {txt = Longident.Lident ident};
57474
57474
} )
57475
57475
when lblTxt = ident (* jsx punning *) -> (
@@ -57495,7 +57495,7 @@ and printJsxProp ~state arg cmtTbl =
57495
57495
| lbl, expr ->
57496
57496
let argLoc, expr =
57497
57497
match expr.pexp_attributes with
57498
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: attrs ->
57498
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: attrs ->
57499
57499
(loc, {expr with pexp_attributes = attrs})
57500
57500
| _ -> (Location.none, expr)
57501
57501
in
@@ -57792,12 +57792,12 @@ and printArgument ~state (argLbl, arg) cmtTbl =
57792
57792
| ( Asttypes.Labelled lbl,
57793
57793
({
57794
57794
pexp_desc = Pexp_ident {txt = Longident.Lident name};
57795
- pexp_attributes = [] | [({Location.txt = "ns .namedArgLoc"}, _)];
57795
+ pexp_attributes = [] | [({Location.txt = "res .namedArgLoc"}, _)];
57796
57796
} as argExpr) )
57797
57797
when lbl = name && not (ParsetreeViewer.isBracedExpr argExpr) ->
57798
57798
let loc =
57799
57799
match arg.pexp_attributes with
57800
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _ -> loc
57800
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _ -> loc
57801
57801
| _ -> arg.pexp_loc
57802
57802
in
57803
57803
let doc = Doc.concat [Doc.tilde; printIdentLike lbl] in
@@ -57811,12 +57811,12 @@ and printArgument ~state (argLbl, arg) cmtTbl =
57811
57811
typ );
57812
57812
pexp_loc;
57813
57813
pexp_attributes =
57814
- ([] | [({Location.txt = "ns .namedArgLoc"}, _)]) as attrs;
57814
+ ([] | [({Location.txt = "res .namedArgLoc"}, _)]) as attrs;
57815
57815
} )
57816
57816
when lbl = name && not (ParsetreeViewer.isBracedExpr argExpr) ->
57817
57817
let loc =
57818
57818
match attrs with
57819
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _ ->
57819
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _ ->
57820
57820
{loc with loc_end = pexp_loc.loc_end}
57821
57821
| _ -> arg.pexp_loc
57822
57822
in
@@ -57834,20 +57834,20 @@ and printArgument ~state (argLbl, arg) cmtTbl =
57834
57834
| ( Asttypes.Optional lbl,
57835
57835
{
57836
57836
pexp_desc = Pexp_ident {txt = Longident.Lident name};
57837
- pexp_attributes = [] | [({Location.txt = "ns .namedArgLoc"}, _)];
57837
+ pexp_attributes = [] | [({Location.txt = "res .namedArgLoc"}, _)];
57838
57838
} )
57839
57839
when lbl = name ->
57840
57840
let loc =
57841
57841
match arg.pexp_attributes with
57842
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _ -> loc
57842
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _ -> loc
57843
57843
| _ -> arg.pexp_loc
57844
57844
in
57845
57845
let doc = Doc.concat [Doc.tilde; printIdentLike lbl; Doc.question] in
57846
57846
printComments doc cmtTbl loc
57847
57847
| _lbl, expr ->
57848
57848
let argLoc, expr =
57849
57849
match expr.pexp_attributes with
57850
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: attrs ->
57850
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: attrs ->
57851
57851
(loc, {expr with pexp_attributes = attrs})
57852
57852
| _ -> (expr.pexp_loc, expr)
57853
57853
in
@@ -58137,13 +58137,13 @@ and printExpFunParameter ~state parameter cmtTbl =
58137
58137
match defaultExpr with
58138
58138
| None -> (
58139
58139
match pattern.ppat_attributes with
58140
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _ ->
58140
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _ ->
58141
58141
{loc with loc_end = pattern.ppat_loc.loc_end}
58142
58142
| _ -> pattern.ppat_loc)
58143
58143
| Some expr ->
58144
58144
let startPos =
58145
58145
match pattern.ppat_attributes with
58146
- | ({Location.txt = "ns .namedArgLoc"; loc}, _) :: _ -> loc.loc_start
58146
+ | ({Location.txt = "res .namedArgLoc"; loc}, _) :: _ -> loc.loc_start
58147
58147
| _ -> pattern.ppat_loc.loc_start
58148
58148
in
58149
58149
{
@@ -163640,7 +163640,7 @@ and parseParameter p =
163640
163640
Parser.next p;
163641
163641
let lblName, loc = parseLident p in
163642
163642
let propLocAttr =
163643
- (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr [])
163643
+ (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr [])
163644
163644
in
163645
163645
match p.Parser.token with
163646
163646
| Comma | Equal | Rparen ->
@@ -164674,7 +164674,7 @@ and parseJsxProp p =
164674
164674
let optional = Parser.optional p Question in
164675
164675
let name, loc = parseLident p in
164676
164676
let propLocAttr =
164677
- (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr [])
164677
+ (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr [])
164678
164678
in
164679
164679
(* optional punning: <foo ?a /> *)
164680
164680
if optional then
@@ -164713,7 +164713,7 @@ and parseJsxProp p =
164713
164713
Parser.next p;
164714
164714
let loc = mkLoc p.Parser.startPos p.prevEndPos in
164715
164715
let propLocAttr =
164716
- (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr [])
164716
+ (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr [])
164717
164717
in
164718
164718
let attrExpr =
164719
164719
let e = parsePrimaryExpr ~operand:(parseAtomicExpr p) p in
@@ -165530,7 +165530,7 @@ and parseArgument2 p ~dotted : argument option =
165530
165530
let endPos = p.prevEndPos in
165531
165531
let loc = mkLoc startPos endPos in
165532
165532
let propLocAttr =
165533
- (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr [])
165533
+ (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr [])
165534
165534
in
165535
165535
let identExpr =
165536
165536
Ast_helper.Exp.ident ~attrs:[propLocAttr] ~loc
@@ -166135,7 +166135,7 @@ and parseTypeParameter p =
166135
166135
Parser.next p;
166136
166136
let name, loc = parseLident p in
166137
166137
let lblLocAttr =
166138
- (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr [])
166138
+ (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr [])
166139
166139
in
166140
166140
Parser.expect ~grammar:Grammar.TypeExpression Colon p;
166141
166141
let typ =
@@ -166213,7 +166213,9 @@ and parseEs6ArrowType ~attrs p =
166213
166213
| Tilde ->
166214
166214
Parser.next p;
166215
166215
let name, loc = parseLident p in
166216
- let lblLocAttr = (Location.mkloc "ns.namedArgLoc" loc, Parsetree.PStr []) in
166216
+ let lblLocAttr =
166217
+ (Location.mkloc "res.namedArgLoc" loc, Parsetree.PStr [])
166218
+ in
166217
166219
Parser.expect ~grammar:Grammar.TypeExpression Colon p;
166218
166220
let typ =
166219
166221
let typ = parseTypExpr ~alias:false ~es6Arrow:false p in
0 commit comments