Skip to content

Commit 484cd9c

Browse files
authored
Disambiguate function expression and statement feature descriptions (mdn#9592)
* Distinguish features for function* statements and expressions * Distinguish `async function` expression and statement features * Fix bad copy and paste * Revise `async function*` description * Rename some function and generator features for consistency
1 parent 3b36fbe commit 484cd9c

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

javascript/operators/async_function_expression.json renamed to javascript/operators/async_function_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"javascript": {
33
"operators": {
4-
"async_function_expression": {
4+
"async_function": {
55
"__compat": {
66
"description": "<code>async function</code> expression",
77
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/async_function",

javascript/operators/async_function_star.json renamed to javascript/operators/async_generator_function.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"javascript": {
33
"operators": {
4-
"async_generator_function_expression": {
4+
"async_generator_function": {
55
"__compat": {
6-
"description": "<code>async generator function</code> expression",
6+
"description": "<code>async function*</code> expression",
77
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/async_function*",
88
"spec_url": "https://tc39.es/ecma262/#sec-async-generator-function-definitions",
99
"support": {

javascript/operators/function.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"operators": {
44
"function": {
55
"__compat": {
6+
"description": "<code>function</code> expression",
67
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function",
78
"spec_url": "https://tc39.es/ecma262/#sec-function-definitions",
89
"support": {

javascript/operators/function_star.json renamed to javascript/operators/generator_function.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"javascript": {
33
"operators": {
4-
"function_star": {
4+
"generator_function": {
55
"__compat": {
6-
"description": "<code>function*</code>",
6+
"description": "<code>function*</code> expression",
77
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function*",
88
"spec_url": "https://tc39.es/ecma262/#sec-generator-function-definitions",
99
"support": {

javascript/statements.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"statements": {
44
"async_function": {
55
"__compat": {
6-
"description": "<code>async function</code>",
6+
"description": "<code>async function</code> statement",
77
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/async_function",
88
"spec_url": "https://tc39.es/ecma262/#sec-async-function-definitions",
99
"support": {
@@ -67,7 +67,7 @@
6767
},
6868
"async_generator_function": {
6969
"__compat": {
70-
"description": "<code>async generator function</code>",
70+
"description": "<code>async function*</code> statement",
7171
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/async_function*",
7272
"spec_url": "https://tc39.es/ecma262/#sec-async-generator-function-definitions",
7373
"support": {
@@ -1244,6 +1244,7 @@
12441244
},
12451245
"function": {
12461246
"__compat": {
1247+
"description": "<code>function</code> statement",
12471248
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function",
12481249
"spec_url": "https://tc39.es/ecma262/#sec-function-definitions",
12491250
"support": {
@@ -1347,7 +1348,7 @@
13471348
},
13481349
"generator_function": {
13491350
"__compat": {
1350-
"description": "<code>function*</code>",
1351+
"description": "<code>function*</code> statement",
13511352
"mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*",
13521353
"spec_url": "https://tc39.es/ecma262/#sec-generator-function-definitions",
13531354
"support": {

0 commit comments

Comments
 (0)