mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibJS: Don't parse arrow function with newline between ) and =>
If there's a newline between the closing paren and arrow it's not a valid arrow function, ASI should kick in instead (it'll then fail with "Unexpected token Arrow")
This commit is contained in:
committed by
Andreas Kling
parent
965d952ff3
commit
e898c98873
@@ -160,4 +160,5 @@ test("syntax errors", () => {
|
||||
expect("(a b) => {}").not.toEval();
|
||||
expect("(a ...b) => {}").not.toEval();
|
||||
expect("(a = 1 = 2) => {}").not.toEval();
|
||||
expect("()\n=> {}").not.toEval();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user