Skip to content

Commit 13f89ef

Browse files
committed
snake_case
1 parent 92d5613 commit 13f89ef

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

jscomp/syntax/src/res_core.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ let suppress_fragile_match_warning_attr =
175175
] )
176176
let make_braces_attr loc = (Location.mkloc "res.braces" loc, Parsetree.PStr [])
177177
let template_literal_attr = (Location.mknoloc "res.template", Parsetree.PStr [])
178-
let makePatVariantSpreadAttr =
178+
let make_pat_variant_spread_attr =
179179
(Location.mknoloc "res.patVariantSpread", Parsetree.PStr [])
180180

181181
let tagged_template_literal_attr =
@@ -1083,7 +1083,7 @@ let rec parse_pattern ?(alias = true) ?(or_ = true) p =
10831083
Parser.next p;
10841084
let ident = parse_value_path p in
10851085
let loc = mk_loc start_pos ident.loc.loc_end in
1086-
Ast_helper.Pat.type_ ~loc ~attrs:(makePatVariantSpreadAttr :: attrs) ident
1086+
Ast_helper.Pat.type_ ~loc ~attrs:(make_pat_variant_spread_attr :: attrs) ident
10871087
| Hash -> (
10881088
Parser.next p;
10891089
if p.Parser.token == DotDotDot then (

jscomp/syntax/src/res_parsetree_viewer.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ let has_await_attribute attrs =
9797
| _ -> false)
9898
attrs
9999

100-
let hasResPatVariantSpreadAttribute attrs =
100+
let has_res_pat_variant_spread_attribute attrs =
101101
List.exists
102102
(function
103103
| {Location.txt = "res.patVariantSpread"}, _ -> true

jscomp/syntax/src/res_parsetree_viewer.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ val process_function_attributes :
2626
Parsetree.attributes -> function_attributes_info
2727

2828
val has_await_attribute : Parsetree.attributes -> bool
29-
val hasResPatVariantSpreadAttribute : Parsetree.attributes -> bool
29+
val has_res_pat_variant_spread_attribute : Parsetree.attributes -> bool
3030

3131
type if_condition_kind =
3232
| If of Parsetree.expression

jscomp/syntax/src/res_printer.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,8 @@ and print_pattern ~state (p : Parsetree.pattern) cmt_tbl =
24062406
Doc.group (Doc.concat [variant_name; args_doc])
24072407
| Ppat_type ident ->
24082408
let prefix =
2409-
if ParsetreeViewer.hasResPatVariantSpreadAttribute p.ppat_attributes
2409+
if
2410+
ParsetreeViewer.has_res_pat_variant_spread_attribute p.ppat_attributes
24102411
then ""
24112412
else "#"
24122413
in

0 commit comments

Comments
 (0)