mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 23:14:47 +02:00
add generators async-generators syntax
This commit is contained in:
parent
57fea22f70
commit
807f62b59b
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
path: language/statements/class/async-gen-private-method-
|
||||||
|
name: Async Generator private method as a ClassDeclaration element
|
||||||
|
esid: prod-AsyncGeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
AsyncGeneratorMethod
|
||||||
|
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorMethod :
|
||||||
|
async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
|
||||||
|
features: [async-iteration, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { async *#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}}
|
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
path: language/statements/class/async-gen-private-method-static-
|
||||||
|
name: Static async generator private method as a ClassDeclaration element
|
||||||
|
esid: prod-AsyncGeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
static PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
AsyncGeneratorMethod
|
||||||
|
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorMethod :
|
||||||
|
async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
|
||||||
|
features: [async-iteration, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { static async *#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}}
|
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
path: language/expressions/class/async-gen-private-method-
|
||||||
|
name: Async generator private method as a ClassExpression element
|
||||||
|
esid: prod-AsyncGeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
AsyncGeneratorMethod
|
||||||
|
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorMethod :
|
||||||
|
async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
|
||||||
|
features: [async-iteration, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var C = class { async *#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}};
|
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
path: language/expressions/class/async-gen-private-method-static-
|
||||||
|
name: Static async generator private method as a ClassExpression element
|
||||||
|
esid: prod-AsyncGeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
static PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
AsyncGeneratorMethod
|
||||||
|
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorMethod :
|
||||||
|
async [no LineTerminator here] * # PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
|
||||||
|
features: [async-iteration, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var C = class { static async *#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}};
|
23
src/generators/syntax/class-decl-private-method.template
Normal file
23
src/generators/syntax/class-decl-private-method.template
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
path: language/statements/class/gen-private-method-
|
||||||
|
name: Generator method as a ClassDeclaration element
|
||||||
|
esid: prod-GeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
GeneratorMethod
|
||||||
|
|
||||||
|
14.4 Generator Function Definitions
|
||||||
|
|
||||||
|
GeneratorMethod :
|
||||||
|
* # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
|
||||||
|
features: [generators, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { *#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}}
|
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
path: language/statements/class/gen-private-method-static-
|
||||||
|
name: Static generator method as a ClassDeclaration element
|
||||||
|
esid: prod-GeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
static PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
GeneratorMethod
|
||||||
|
|
||||||
|
14.4 Generator Function Definitions
|
||||||
|
|
||||||
|
GeneratorMethod :
|
||||||
|
* # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
|
||||||
|
features: [generators, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C {static *#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}}
|
23
src/generators/syntax/class-expr-private-method.template
Normal file
23
src/generators/syntax/class-expr-private-method.template
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
path: language/expressions/class/gen-private-method-
|
||||||
|
name: Generator private method as a ClassExpression element
|
||||||
|
esid: prod-GeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
GeneratorMethod
|
||||||
|
|
||||||
|
14.4 Generator Function Definitions
|
||||||
|
|
||||||
|
GeneratorMethod :
|
||||||
|
* # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
|
||||||
|
features: [generators, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var C = class {*#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}};
|
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
path: language/expressions/class/gen-private-method-static-
|
||||||
|
name: Static generator private method as a ClassExpression element
|
||||||
|
esid: prod-GeneratorMethod
|
||||||
|
info: |
|
||||||
|
ClassElement :
|
||||||
|
static PrivateMethodDefinition
|
||||||
|
|
||||||
|
MethodDefinition :
|
||||||
|
GeneratorMethod
|
||||||
|
|
||||||
|
14.4 Generator Function Definitions
|
||||||
|
|
||||||
|
GeneratorMethod :
|
||||||
|
* # PropertyName ( UniqueFormalParameters ) { GeneratorBody }
|
||||||
|
features: [generators, class-methods-private]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var C = class { static *#gen() {
|
||||||
|
/*{ body }*/
|
||||||
|
}};
|
Loading…
x
Reference in New Issue
Block a user