@@ -3189,15 +3189,15 @@ end = struct
3189
3189
3190
3190
let processBracesAttr expr =
3191
3191
match expr.pexp_attributes with
3192
- | (({txt = "ns .braces"}, _) as attr)::attrs ->
3192
+ | (({txt = "res .braces"}, _) as attr)::attrs ->
3193
3193
(Some attr, {expr with pexp_attributes = attrs})
3194
3194
| _ ->
3195
3195
(None, expr)
3196
3196
3197
3197
let filterParsingAttrs attrs =
3198
3198
List.filter (fun attr ->
3199
3199
match attr with
3200
- | ({Location.txt = ("ns .ternary" | "ns .braces" | "bs" | "ns .namedArgLoc")}, _) -> false
3200
+ | ({Location.txt = ("res .ternary" | "res .braces" | "bs" | "res .namedArgLoc")}, _) -> false
3201
3201
| _ -> true
3202
3202
) attrs
3203
3203
@@ -3301,7 +3301,7 @@ end = struct
3301
3301
3302
3302
let hasAttributes attrs =
3303
3303
List.exists (fun attr -> match attr with
3304
- | ({Location.txt = "bs" | "ns .ternary" | "ns .braces"}, _) -> false
3304
+ | ({Location.txt = "bs" | "res .ternary" | "res .braces"}, _) -> false
3305
3305
| _ -> true
3306
3306
) attrs
3307
3307
@@ -3315,7 +3315,7 @@ end = struct
3315
3315
let rec hasTernaryAttribute attrs =
3316
3316
match attrs with
3317
3317
| [] -> false
3318
- | ({Location.txt="ns .ternary"},_)::_ -> true
3318
+ | ({Location.txt="res .ternary"},_)::_ -> true
3319
3319
| _::attrs -> hasTernaryAttribute attrs
3320
3320
3321
3321
let isTernaryExpr expr = match expr with
@@ -3346,7 +3346,7 @@ end = struct
3346
3346
3347
3347
let filterTernaryAttributes attrs =
3348
3348
List.filter (fun attr -> match attr with
3349
- |({Location.txt="ns .ternary"},_) -> false
3349
+ |({Location.txt="res .ternary"},_) -> false
3350
3350
| _ -> true
3351
3351
) attrs
3352
3352
@@ -3403,13 +3403,13 @@ end = struct
3403
3403
3404
3404
let filterPrinteableAttributes attrs =
3405
3405
List.filter (fun attr -> match attr with
3406
- | ({Location.txt="bs" | "ns .ternary"}, _) -> false
3406
+ | ({Location.txt="bs" | "res .ternary"}, _) -> false
3407
3407
| _ -> true
3408
3408
) attrs
3409
3409
3410
3410
let partitionPrinteableAttributes attrs =
3411
3411
List.partition (fun attr -> match attr with
3412
- | ({Location.txt="bs" | "ns .ternary"}, _) -> false
3412
+ | ({Location.txt="bs" | "res .ternary"}, _) -> false
3413
3413
| _ -> true
3414
3414
) attrs
3415
3415
@@ -5189,7 +5189,7 @@ module CommentTable = struct
5189
5189
walkList
5190
5190
~getLoc:(fun (_argLabel, expr) ->
5191
5191
let loc = match expr.Parsetree.pexp_attributes with
5192
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_attrs ->
5192
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_attrs ->
5193
5193
{loc with loc_end = expr.pexp_loc.loc_end}
5194
5194
| _ ->
5195
5195
expr.pexp_loc
@@ -5207,7 +5207,7 @@ module CommentTable = struct
5207
5207
~getLoc:(fun (_attrs, _argLbl, exprOpt, pattern) ->
5208
5208
let open Parsetree in
5209
5209
let startPos = match pattern.ppat_attributes with
5210
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_attrs ->
5210
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_attrs ->
5211
5211
loc.loc_start
5212
5212
| _ ->
5213
5213
pattern.ppat_loc.loc_start
@@ -5279,7 +5279,7 @@ module CommentTable = struct
5279
5279
5280
5280
and walkExprArgument (_argLabel, expr) t comments =
5281
5281
match expr.Parsetree.pexp_attributes with
5282
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_attrs ->
5282
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_attrs ->
5283
5283
let (leading, trailing) = partitionLeadingTrailing comments loc in
5284
5284
attach t.leading loc leading;
5285
5285
let (afterLabel, rest) = partitionAdjacentTrailing loc trailing in
@@ -7706,7 +7706,7 @@ module Printer = struct
7706
7706
ParsetreeViewer.isBinaryExpression expr ||
7707
7707
(match vb.pvb_expr with
7708
7708
| {
7709
- pexp_attributes = [({Location.txt="ns .ternary"}, _)];
7709
+ pexp_attributes = [({Location.txt="res .ternary"}, _)];
7710
7710
pexp_desc = Pexp_ifthenelse (ifExpr, _, _)
7711
7711
} ->
7712
7712
ParsetreeViewer.isBinaryExpression ifExpr || ParsetreeViewer.hasAttributes ifExpr.pexp_attributes
@@ -9250,7 +9250,7 @@ module Printer = struct
9250
9250
match Parens.binaryExpr {expr with
9251
9251
pexp_attributes = List.filter (fun attr ->
9252
9252
match attr with
9253
- | ({Location.txt = ("ns .braces")}, _) -> false
9253
+ | ({Location.txt = ("res .braces")}, _) -> false
9254
9254
| _ -> true
9255
9255
) expr.pexp_attributes
9256
9256
} with
@@ -9402,7 +9402,7 @@ module Printer = struct
9402
9402
ParsetreeViewer.isBinaryExpression targetExpr ||
9403
9403
(match targetExpr with
9404
9404
| {
9405
- pexp_attributes = [({Location.txt="ns .ternary"}, _)];
9405
+ pexp_attributes = [({Location.txt="res .ternary"}, _)];
9406
9406
pexp_desc = Pexp_ifthenelse (ifExpr, _, _)
9407
9407
} ->
9408
9408
ParsetreeViewer.isBinaryExpression ifExpr || ParsetreeViewer.hasAttributes ifExpr.pexp_attributes
@@ -9599,7 +9599,7 @@ module Printer = struct
9599
9599
| (
9600
9600
(Asttypes.Labelled lblTxt | Optional lblTxt) as lbl,
9601
9601
{
9602
- Parsetree.pexp_attributes = [({Location.txt = "ns .namedArgLoc"; loc = argLoc}, _)];
9602
+ Parsetree.pexp_attributes = [({Location.txt = "res .namedArgLoc"; loc = argLoc}, _)];
9603
9603
pexp_desc = Pexp_ident {txt = Longident.Lident ident}
9604
9604
}
9605
9605
) when lblTxt = ident (* jsx punning *) ->
@@ -9631,7 +9631,7 @@ module Printer = struct
9631
9631
end
9632
9632
| (lbl, expr) ->
9633
9633
let (argLoc, expr) = match expr.pexp_attributes with
9634
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::attrs ->
9634
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::attrs ->
9635
9635
(loc, {expr with pexp_attributes = attrs})
9636
9636
| _ ->
9637
9637
Location.none, expr
@@ -9845,11 +9845,11 @@ module Printer = struct
9845
9845
| (
9846
9846
(Asttypes.Labelled lbl),
9847
9847
({pexp_desc=Pexp_ident {txt = Longident.Lident name};
9848
- pexp_attributes = ([] | [({Location.txt = "ns .namedArgLoc";}, _)])
9848
+ pexp_attributes = ([] | [({Location.txt = "res .namedArgLoc";}, _)])
9849
9849
} as argExpr)
9850
9850
) when lbl = name && not (ParsetreeViewer.isBracedExpr argExpr) ->
9851
9851
let loc = match arg.pexp_attributes with
9852
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_ -> loc
9852
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_ -> loc
9853
9853
| _ -> arg.pexp_loc
9854
9854
in
9855
9855
let doc = Doc.concat [
@@ -9866,11 +9866,11 @@ module Printer = struct
9866
9866
typ
9867
9867
);
9868
9868
pexp_loc;
9869
- pexp_attributes = ([] | [({Location.txt = "ns .namedArgLoc";}, _)]) as attrs
9869
+ pexp_attributes = ([] | [({Location.txt = "res .namedArgLoc";}, _)]) as attrs
9870
9870
}
9871
9871
) when lbl = name && not (ParsetreeViewer.isBracedExpr argExpr) ->
9872
9872
let loc = match attrs with
9873
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_ ->
9873
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_ ->
9874
9874
{loc with loc_end = pexp_loc.loc_end}
9875
9875
| _ -> arg.pexp_loc
9876
9876
in
@@ -9885,11 +9885,11 @@ module Printer = struct
9885
9885
| (
9886
9886
(Asttypes.Optional lbl),
9887
9887
{pexp_desc=Pexp_ident {txt = Longident.Lident name};
9888
- pexp_attributes = ([] | [({Location.txt = "ns .namedArgLoc";}, _)])
9888
+ pexp_attributes = ([] | [({Location.txt = "res .namedArgLoc";}, _)])
9889
9889
}
9890
9890
) when lbl = name ->
9891
9891
let loc = match arg.pexp_attributes with
9892
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_ -> loc
9892
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_ -> loc
9893
9893
| _ -> arg.pexp_loc
9894
9894
in
9895
9895
let doc = Doc.concat [
@@ -9900,7 +9900,7 @@ module Printer = struct
9900
9900
printComments doc cmtTbl loc
9901
9901
| (_lbl, expr) ->
9902
9902
let (argLoc, expr) = match expr.pexp_attributes with
9903
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::attrs ->
9903
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::attrs ->
9904
9904
(loc, {expr with pexp_attributes = attrs})
9905
9905
| _ ->
9906
9906
expr.pexp_loc, expr
@@ -10095,7 +10095,7 @@ module Printer = struct
10095
10095
| (
10096
10096
(Asttypes.Labelled lbl | Optional lbl),
10097
10097
{ppat_desc = Ppat_var stringLoc;
10098
- ppat_attributes = ([] | [({Location.txt = "ns .namedArgLoc";}, _)])
10098
+ ppat_attributes = ([] | [({Location.txt = "res .namedArgLoc";}, _)])
10099
10099
}
10100
10100
) when lbl = stringLoc.txt ->
10101
10101
(* ~d *)
@@ -10106,7 +10106,7 @@ module Printer = struct
10106
10106
| (
10107
10107
(Asttypes.Labelled lbl | Optional lbl),
10108
10108
({ppat_desc = Ppat_constraint ({ ppat_desc = Ppat_var { txt } }, typ);
10109
- ppat_attributes = ([] | [({Location.txt = "ns .namedArgLoc";}, _)])
10109
+ ppat_attributes = ([] | [({Location.txt = "res .namedArgLoc";}, _)])
10110
10110
})
10111
10111
) when lbl = txt ->
10112
10112
(* ~d: e *)
@@ -10141,13 +10141,13 @@ module Printer = struct
10141
10141
let cmtLoc = match defaultExpr with
10142
10142
| None ->
10143
10143
begin match pattern.ppat_attributes with
10144
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_ ->
10144
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_ ->
10145
10145
{loc with loc_end = pattern.ppat_loc.loc_end}
10146
10146
| _ -> pattern.ppat_loc
10147
10147
end
10148
10148
| Some expr ->
10149
10149
let startPos = match pattern.ppat_attributes with
10150
- | ({Location.txt = "ns .namedArgLoc"; loc}, _)::_ ->
10150
+ | ({Location.txt = "res .namedArgLoc"; loc}, _)::_ ->
10151
10151
loc.loc_start
10152
10152
| _ -> pattern.ppat_loc.loc_start
10153
10153
in {
@@ -11991,7 +11991,7 @@ module ParsetreeCompatibility = struct
11991
11991
{pc_lhs = {ppat_desc = Ppat_construct ({txt = Longident.Lident "false"}, None)}; pc_rhs = elseExpr };
11992
11992
]
11993
11993
) ->
11994
- let ternaryMarker = (Location.mknoloc "ns .ternary", Parsetree.PStr []) in
11994
+ let ternaryMarker = (Location.mknoloc "res .ternary", Parsetree.PStr []) in
11995
11995
Ast_helper.Exp.ifthenelse
11996
11996
~loc:expr.pexp_loc
11997
11997
~attrs:(ternaryMarker::expr.pexp_attributes)
@@ -12322,8 +12322,8 @@ end
12322
12322
12323
12323
let jsxAttr = (Location.mknoloc "JSX", Parsetree.PStr [])
12324
12324
let uncurryAttr = (Location.mknoloc "bs", Parsetree.PStr [])
12325
- let ternaryAttr = (Location.mknoloc "ns .ternary", Parsetree.PStr [])
12326
- let makeBracesAttr loc = (Location.mkloc "ns .braces" loc, Parsetree.PStr [])
12325
+ let ternaryAttr = (Location.mknoloc "res .ternary", Parsetree.PStr [])
12326
+ let makeBracesAttr loc = (Location.mkloc "res .braces" loc, Parsetree.PStr [])
12327
12327
12328
12328
type typDefOrExt =
12329
12329
| TypeDef of {recFlag: Asttypes.rec_flag; types: Parsetree.type_declaration list}
@@ -13769,7 +13769,7 @@ end
13769
13769
| Tilde ->
13770
13770
Parser.next p;
13771
13771
let (lblName, loc) = parseLident p in
13772
- let propLocAttr = (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr []) in
13772
+ let propLocAttr = (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr []) in
13773
13773
begin match p.Parser.token with
13774
13774
| Comma | Equal | Rparen ->
13775
13775
let loc = mkLoc startPos p.prevEndPos in
@@ -14760,7 +14760,7 @@ end
14760
14760
| Question | Lident _ ->
14761
14761
let optional = Parser.optional p Question in
14762
14762
let (name, loc) = parseLident p in
14763
- let propLocAttr = (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr []) in
14763
+ let propLocAttr = (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr []) in
14764
14764
(* optional punning: <foo ?a /> *)
14765
14765
if optional then
14766
14766
Some (
@@ -15444,7 +15444,7 @@ end
15444
15444
Parser.next p;
15445
15445
let endPos = p.prevEndPos in
15446
15446
let loc = mkLoc startPos endPos in
15447
- let propLocAttr = (Location.mkloc "ns .namedArgLoc" loc, Parsetree.PStr []) in
15447
+ let propLocAttr = (Location.mkloc "res .namedArgLoc" loc, Parsetree.PStr []) in
15448
15448
let identExpr = Ast_helper.Exp.ident ~attrs:[propLocAttr] ~loc (
15449
15449
Location.mkloc (Longident.Lident ident) loc
15450
15450
) in
0 commit comments