@@ -107,7 +107,13 @@ impl<I: Tokens> Parser<I> {
107107 let start = self . cur_pos ( ) ;
108108 self . expect ( & Token :: LessSlash ) ?;
109109 let tagname = self . parse_jsx_element_name ( ) ?;
110+
111+ // Handle JSX closing tag followed by '=': '</tag>='
112+ // When lexer sees '>=' it combines into GtEq, but JSX only needs '>'
113+ // Use rescan_jsx_open_el_terminal_token to split >= back into >
114+ self . input_mut ( ) . rescan_jsx_open_el_terminal_token ( ) ;
110115 self . expect_without_advance ( & Token :: Gt ) ?;
116+
111117 if in_expr_context {
112118 self . bump ( ) ;
113119 } else {
@@ -138,7 +144,13 @@ impl<I: Tokens> Parser<I> {
138144 fn parse_jsx_closing_fragment ( & mut self , in_expr_context : bool ) -> PResult < JSXClosingFragment > {
139145 let start = self . cur_pos ( ) ;
140146 self . expect ( & Token :: LessSlash ) ?;
147+
148+ // Handle JSX closing fragment followed by '=': '</>=
149+ // When lexer sees '>=' it combines into GtEq, but JSX only needs '>'
150+ // Use rescan_jsx_open_el_terminal_token to split >= back into >
151+ self . input_mut ( ) . rescan_jsx_open_el_terminal_token ( ) ;
141152 self . expect_without_advance ( & Token :: Gt ) ?;
153+
142154 if in_expr_context {
143155 self . bump ( ) ;
144156 } else {
@@ -307,6 +319,12 @@ impl<I: Tokens> Parser<I> {
307319 let ctx = self . ctx ( ) & !Context :: ShouldNotLexLtOrGtAsType ;
308320 self . with_ctx ( ctx) . parse_with ( |p| {
309321 p. expect ( & Token :: Lt ) ?;
322+
323+ // Handle JSX fragment opening followed by '=': '<>='
324+ // When lexer sees '>=' it combines into GtEq, but JSX fragment only needs '>'
325+ // Use rescan_jsx_open_el_terminal_token to split >= back into >
326+ p. input_mut ( ) . rescan_jsx_open_el_terminal_token ( ) ;
327+
310328 if p. input_mut ( ) . cur ( ) . is_some_and ( |cur| cur == & Token :: Gt ) {
311329 // <>xxxxxx</>
312330 p. input_mut ( ) . scan_jsx_token ( true ) ;
@@ -369,7 +387,13 @@ impl<I: Tokens> Parser<I> {
369387 } else {
370388 // <xxxxx/>
371389 p. expect ( & Token :: Slash ) ?;
390+
391+ // Handle JSX self-closing tag followed by '=': '<tag/>='
392+ // When lexer sees '>=' it combines into GtEq, but JSX only needs '>'
393+ // Use rescan_jsx_open_el_terminal_token to split >= back into >
394+ p. input_mut ( ) . rescan_jsx_open_el_terminal_token ( ) ;
372395 p. expect_without_advance ( & Token :: Gt ) ?;
396+
373397 if in_expr_context {
374398 p. bump ( ) ;
375399 } else {
0 commit comments