Skip to content
Snippets Groups Projects
Commit 36a8672a authored by André Bargull's avatar André Bargull
Browse files

Add templates for escaped and unescaped 'yield' and 'await' as identifiers

parent d887db88
No related branches found
No related tags found
No related merge requests found
Showing
with 423 additions and 0 deletions
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as a binding identifier.
info: |
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var \u0061wait;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as a binding identifier.
info: |
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var await;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as an identifier reference.
info: |
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void \u0061wait;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as an identifier reference.
info: |
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void await;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as a label identifier.
info: |
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
\u0061wait: ;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as a label identifier.
info: |
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
await: ;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/async-arrow-function/
name: Async arrow function
esid: prod-AsyncArrowFunction
info: |
Async Arrow Function Definitions
AsyncArrowFunction[In, Yield, Await]:
async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In]
CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await] [no LineTerminator here] => AsyncConciseBody[?In]
AsyncConciseBody[In]:
{ AsyncFunctionBody }
features: [async-functions]
---*/
async() => {
/*{ body }*/
};
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/async-method-
name: Async method as a ClassDeclaration element
esid: prod-AsyncMethod
info: |
ClassElement :
MethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
class C { async method() {
/*{ body }*/
}}
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/async-method-static-
name: Static async method as a ClassDeclaration element
esid: prod-AsyncMethod
info: |
ClassElement :
static MethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
class C { static async method() {
/*{ body }*/
}}
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/async-method-
name: Async method as a ClassExpression element
esid: prod-AsyncMethod
info: |
ClassElement :
MethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
var C = class { async method() {
/*{ body }*/
}};
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/async-method-static-
name: Static async method as a ClassExpression element
esid: prod-AsyncMethod
info: |
ClassElement :
static MethodDefinition
MethodDefinition :
AsyncMethod
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
var C = class { static async method() {
/*{ body }*/
}};
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/async-function/
name: Async function declaration
esid: prod-AsyncFunctionDeclaration
info: |
Async Function Definitions
AsyncFunctionDeclaration:
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
async function fn() {
/*{ body }*/
}
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/async-function/named-
name: Named async function expression
esid: prod-AsyncFunctionExpression
info: |
Async Function Definitions
AsyncFunctionExpression :
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
var fn = async function fn() {
/*{ body }*/
};
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/async-function/
name: Unnamed async function expression
esid: prod-AsyncFunctionExpression
info: |
Async Function Definitions
AsyncFunctionExpression :
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
var fn = async function () {
/*{ body }*/
};
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/object/method-definition/async-
name: Async method
esid: prod-AsyncMethod
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
features: [async-functions]
---*/
var obj = {
async method() {
/*{ body }*/
}
};
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as a binding identifier.
info: |
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var \u0061wait;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as a binding identifier.
info: |
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var await;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as an identifier reference.
info: |
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void \u0061wait;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as an identifier reference.
info: |
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void await;
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-identifiers-static-semantics-early-errors
desc: >
await is a reserved keyword within generator function bodies and may not be
used as a label identifier.
info: |
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
\u0061wait: ;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment