Skip to content

Commit

Permalink
Fix error with JSX element inside pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilios1995 committed Mar 20, 2024
1 parent 6651fae commit e0bc632
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ module.exports = grammar({
$.module_pack,
$.extension_expression,
$.lazy_expression,
$._jsx_element
),

parenthesized_expression: $ => seq(
Expand Down
17 changes: 17 additions & 0 deletions test/corpus/jsx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,20 @@ Spread props
(value_identifier))))
(jsx_closing_element
(jsx_identifier)))))

================================================================================
Elements in pipes
================================================================================

<Comp />->Some

--------------------------------------------------------------------------------

(source_file
(expression_statement
(pipe_expression
(jsx_self_closing_element
(jsx_identifier))
(variant
(variant_identifier)))))

0 comments on commit e0bc632

Please sign in to comment.