Update Yuku parser to v0.9.1 (#19915)
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
2556c4c89b
commit
f075333833
6 files changed
+124
-92
No files matched your search
@@ -56,11 +56,7 @@ const disabledTests = new Map(
|
||||
oxc: [],
|
||||
"oxc-ts": [],
|
||||
yuku: ["js/await/await-with-parens.js"],
|
||||
"yuku-ts": [
|
||||
"js/await/await-with-parens.js",
|
||||
"js/decorators/rest-parameters/constructor.js",
|
||||
"js/decorators/rest-parameters/method.js",
|
||||
],
|
||||
"yuku-ts": ["js/await/await-with-parens.js"],
|
||||
hermes: [
|
||||
"js/await/like-call.js", // Different result
|
||||
"jsx/top-level-await/test.jsx",
|
||||
|
||||
@@ -56,6 +56,18 @@ exports[`snippet: #0 format[typescript] 1`] = `
|
||||
Cause: The variable declaration of a 'for...in' statement cannot have an initializer."
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[yuku] 1`] = `
|
||||
"for-in loop variable declaration may not have an initializer (1:10)
|
||||
> 1 | for (let a = 1 in b);
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[yuku-ts] 1`] = `
|
||||
"for-in loop variable declaration may not have an initializer (1:10)
|
||||
> 1 | for (let a = 1 in b);
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"for-in loop variable declaration may not have an initializer (1:6)
|
||||
> 1 | for (const a = 1 in b);
|
||||
@@ -112,6 +124,18 @@ exports[`snippet: #1 format[typescript] 1`] = `
|
||||
Cause: The variable declaration of a 'for...in' statement cannot have an initializer."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[yuku] 1`] = `
|
||||
"for-in loop variable declaration may not have an initializer (1:12)
|
||||
> 1 | for (const a = 1 in b);
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[yuku-ts] 1`] = `
|
||||
"for-in loop variable declaration may not have an initializer (1:12)
|
||||
> 1 | for (const a = 1 in b);
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 format[acorn] 1`] = `
|
||||
"for-in loop variable declaration may not have an initializer (1:7)
|
||||
> 1 | {for (using a = 1 in b);}
|
||||
@@ -167,3 +191,15 @@ exports[`snippet: #2 format[typescript] 1`] = `
|
||||
| ^^^^^
|
||||
Cause: The variable declaration of a 'for...in' statement cannot have an initializer."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 format[yuku] 1`] = `
|
||||
"The left-hand side of a for...in statement cannot be an using declaration. (1:7)
|
||||
> 1 | {for (using a = 1 in b);}
|
||||
| ^^^^^^^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 format[yuku-ts] 1`] = `
|
||||
"The left-hand side of a for...in statement cannot be an using declaration. (1:7)
|
||||
> 1 | {for (using a = 1 in b);}
|
||||
| ^^^^^^^^^^^"
|
||||
`;
|
||||
@@ -16,8 +16,8 @@ runFormatTest(
|
||||
// "babel-ts",
|
||||
"oxc",
|
||||
"oxc-ts",
|
||||
// "yuku",
|
||||
// "yuku-ts",
|
||||
"yuku",
|
||||
"yuku-ts",
|
||||
"flow",
|
||||
"hermes",
|
||||
// "__babel_estree",
|
||||
|
||||
@@ -916,25 +916,25 @@ Cause: ',' expected."
|
||||
`;
|
||||
|
||||
exports[`for-in-with-initializer.js format[yuku] 1`] = `
|
||||
"Expected ';' after for-loop init, but found ')' (4:33)
|
||||
"for-in loop variable declaration may not have an initializer (3:10)
|
||||
1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
|
||||
2 |
|
||||
3 | for (var a = (b in c) in {});
|
||||
> 4 | for (var a = 1 || (b in c) in {});
|
||||
| ^
|
||||
> 3 | for (var a = (b in c) in {});
|
||||
| ^^^^^^^^^^^^
|
||||
4 | for (var a = 1 || (b in c) in {});
|
||||
5 | for (var a = 1 + (2 || (b in c)) in {});
|
||||
6 | for (var a = (() => b in c) in {});
|
||||
7 | for (var a = 1 || (() => b in c) in {});"
|
||||
6 | for (var a = (() => b in c) in {});"
|
||||
`;
|
||||
|
||||
exports[`for-in-with-initializer.js format[yuku-ts] 1`] = `
|
||||
"Expected ';' after for-loop init, but found ')' (4:33)
|
||||
"for-in loop variable declaration may not have an initializer (3:10)
|
||||
1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
|
||||
2 |
|
||||
3 | for (var a = (b in c) in {});
|
||||
> 4 | for (var a = 1 || (b in c) in {});
|
||||
| ^
|
||||
> 3 | for (var a = (b in c) in {});
|
||||
| ^^^^^^^^^^^^
|
||||
4 | for (var a = 1 || (b in c) in {});
|
||||
5 | for (var a = 1 + (2 || (b in c)) in {});
|
||||
6 | for (var a = (() => b in c) in {});
|
||||
7 | for (var a = 1 || (() => b in c) in {});"
|
||||
6 | for (var a = (() => b in c) in {});"
|
||||
`;
|
||||
|
||||
exports[`in.js format 1`] = `
|
||||
|
||||
Reference in new issue
Block a user