Skip to content

Commit eae0249

Browse files
committed
Remove merlin.focus attribute
1 parent 8c5d3ee commit eae0249

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

compiler/syntax/src/jsx_v4.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ let rec constrain_jsx_return ~loc expr =
7878
}
7979
| _ -> jsx_element_constraint ~loc expr
8080

81-
let merlin_focus = ({loc = Location.none; txt = "merlin.focus"}, PStr [])
82-
8381
(* Helper method to filter out any attribute that isn't [@react.component] *)
8482
let other_attrs_pure (loc, _) =
8583
match loc.txt with
@@ -105,7 +103,7 @@ let make_new_binding binding expression new_name =
105103
pvb_pat =
106104
{pvb_pat with ppat_desc = Ppat_var {ppat_var with txt = new_name}};
107105
pvb_expr = expression;
108-
pvb_attributes = [merlin_focus];
106+
pvb_attributes = [];
109107
}
110108
| {pvb_loc} ->
111109
Jsx_common.raise_error ~loc:pvb_loc

tests/syntax_tests/data/ppx/react/expected/v4.res.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ module Rec = {
5757
type props = {}
5858

5959
let rec make = {
60-
@merlin.focus
6160
let \"make$Internal" = (_: props): Jsx.element => {
6261
make(({}: props))
6362
}
@@ -75,7 +74,6 @@ module Rec1 = {
7574
type props = {}
7675

7776
let rec make = {
78-
@merlin.focus
7977
let \"make$Internal" = (_: props): Jsx.element => {
8078
React.null
8179
}
@@ -93,7 +91,6 @@ module Rec2 = {
9391
type props = {}
9492

9593
let rec make = {
96-
@merlin.focus
9794
let \"make$Internal" = (_: props): Jsx.element => {
9895
mm(({}: props))
9996
}

0 commit comments

Comments
 (0)