Files
oxc-project__oxc/tasks/coverage/misc/fail/jsx-unparenthesized-comma.jsx
camc314 92afee6734 fix(parser): allow parenthesized JSX comma expressions with preserve_parens=false (#26524)
Allow parenthesized comma expressions such as `<A>{(a, b)}</A>` and `<A x={(a, b)} />` when `preserve_parens` is false.

Compare the sequence expression's start with the first token's start to retain the grouping distinction after parentheses are omitted from the AST. Ungrouped comma expressions such as `{a, b}` and `{(a, b), c}` remain invalid.
2026-09-10 10:30:38 +00:00

4 lines
71 B
React

<A>{a, b}</A>;
<A x={a, b} />;
<A>{(a, b), c}</A>;
<A x={(a, b), c} />;