add generators async-generators syntax

This commit is contained in:
jbhoosreddy 2018-09-04 00:23:22 -04:00
parent 57fea22f70
commit 807f62b59b
8 changed files with 188 additions and 0 deletions

View File

@ -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 }*/
}}

View File

@ -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 }*/
}}

View File

@ -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 }*/
}};

View File

@ -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 }*/
}};

View 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 }*/
}}

View 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-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 }*/
}}

View 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 }*/
}};

View 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-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 }*/
}};