add async function syntax

This commit is contained in:
jbhoosreddy 2018-09-04 00:09:35 -04:00
parent 057cd9935d
commit 57fea22f70
12 changed files with 104 additions and 8 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-private-method-
name: Async private method as a ClassDeclaration element
esid: prod-AsyncMethod
info: |
ClassElement :
PrivateMethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions, class-methods-private]
---*/
class C { async #method() {
/*{ 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-private-method-static-
name: Static async private method as a ClassDeclaration element
esid: prod-AsyncMethod
info: |
ClassElement :
static PrivateMethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions, class-methods-private]
---*/
class C { static async #method() {
/*{ 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-private-method-
name: Async private method as a ClassExpression element
esid: prod-AsyncMethod
info: |
ClassElement :
PrivateMethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions, class-methods-private]
---*/
var C = class { async #method() {
/*{ 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-private-method-static-
name: Static private async method as a ClassExpression element
esid: prod-AsyncMethod
info: |
ClassElement :
static PrivateMethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions, class-methods-private]
---*/
var C = class { static async #method() {
/*{ body }*/
}};

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// Copyright (C) 2018 Bloomberb LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// Copyright (C) 2018 Bloomberg L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// 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-method-

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// 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-

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// 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-

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 Jaideep Bhoosreddy. All rights reserved.
// 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-