mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
92afee6734
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.
4 lines
71 B
React
4 lines
71 B
React
<A>{a, b}</A>;
|
|
<A x={a, b} />;
|
|
<A>{(a, b), c}</A>;
|
|
<A x={(a, b), c} />; |