mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
parent
3b1212e8bd
commit
2b4d1bf142
4 changed files with 14 additions and 5 deletions
|
|
@ -250,7 +250,7 @@ impl<'a> Parser<'a> {
|
||||||
|
|
||||||
fn parse_jsx_assignment_expression(&mut self) -> Result<Expression<'a>> {
|
fn parse_jsx_assignment_expression(&mut self) -> Result<Expression<'a>> {
|
||||||
let ctx = self.ctx;
|
let ctx = self.ctx;
|
||||||
self.ctx = Context::default();
|
self.ctx = Context::default().and_await(ctx.has_await());
|
||||||
let expr = self.parse_expression();
|
let expr = self.parse_expression();
|
||||||
if let Ok(Expression::SequenceExpression(seq)) = &expr {
|
if let Ok(Expression::SequenceExpression(seq)) = &expr {
|
||||||
return Err(diagnostics::JSXExpressionsMayNotUseTheCommaOperator(seq.span).into());
|
return Err(diagnostics::JSXExpressionsMayNotUseTheCommaOperator(seq.span).into());
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
codegen_misc Summary:
|
codegen_misc Summary:
|
||||||
AST Parsed : 8/8 (100.00%)
|
AST Parsed : 9/9 (100.00%)
|
||||||
Positive Passed: 8/8 (100.00%)
|
Positive Passed: 9/9 (100.00%)
|
||||||
|
|
|
||||||
9
tasks/coverage/misc/pass/oxc-1740.tsx
Normal file
9
tasks/coverage/misc/pass/oxc-1740.tsx
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
export const foo = () => ({
|
||||||
|
render: async () => {
|
||||||
|
ReactDOM.render(
|
||||||
|
<Bar {...config} attribute={await baz} />,
|
||||||
|
domNode,
|
||||||
|
() => {}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
parser_misc Summary:
|
parser_misc Summary:
|
||||||
AST Parsed : 8/8 (100.00%)
|
AST Parsed : 9/9 (100.00%)
|
||||||
Positive Passed: 8/8 (100.00%)
|
Positive Passed: 9/9 (100.00%)
|
||||||
Negative Passed: 3/3 (100.00%)
|
Negative Passed: 3/3 (100.00%)
|
||||||
× Unexpected token
|
× Unexpected token
|
||||||
╭─[fail/oxc-169.js:1:1]
|
╭─[fail/oxc-169.js:1:1]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue