Skip to content

Commit e0bc632

Browse files
committed
Fix error with JSX element inside pipe
1 parent 6651fae commit e0bc632

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

grammar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ module.exports = grammar({
528528
$.module_pack,
529529
$.extension_expression,
530530
$.lazy_expression,
531+
$._jsx_element
531532
),
532533

533534
parenthesized_expression: $ => seq(

test/corpus/jsx.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,20 @@ Spread props
310310
(value_identifier))))
311311
(jsx_closing_element
312312
(jsx_identifier)))))
313+
314+
================================================================================
315+
Elements in pipes
316+
================================================================================
317+
318+
<Comp />->Some
319+
320+
--------------------------------------------------------------------------------
321+
322+
(source_file
323+
(expression_statement
324+
(pipe_expression
325+
(jsx_self_closing_element
326+
(jsx_identifier))
327+
(variant
328+
(variant_identifier)))))
329+

0 commit comments

Comments
 (0)