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

This commit is contained in:
André Bargull 2017-05-02 12:09:31 -07:00
parent d887db88ee
commit 36a8672ae6
49 changed files with 1022 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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: ;

View File

@ -0,0 +1,21 @@
// 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: ;

View File

@ -0,0 +1,22 @@
// 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 }*/
};

View File

@ -0,0 +1,24 @@
// 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 }*/
}}

View File

@ -0,0 +1,24 @@
// 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 }*/
}}

View File

@ -0,0 +1,24 @@
// 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 }*/
}};

View File

@ -0,0 +1,24 @@
// 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 }*/
}};

View File

@ -0,0 +1,18 @@
// 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 }*/
}

View File

@ -0,0 +1,18 @@
// 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 }*/
};

View File

@ -0,0 +1,18 @@
// 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 }*/
};

View File

@ -0,0 +1,20 @@
// 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 }*/
}
};

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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;

View File

@ -0,0 +1,21 @@
// 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: ;

View File

@ -0,0 +1,21 @@
// 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: ;

View File

@ -0,0 +1,24 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/async-gen-method-
name: Async Generator method as a ClassDeclaration element
esid: prod-AsyncGeneratorMethod
info: |
ClassElement :
MethodDefinition
MethodDefinition :
AsyncGeneratorMethod
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
features: [async-iteration]
---*/
class C { async *gen() {
/*{ body }*/
}}

View File

@ -0,0 +1,24 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/async-gen-method-static-
name: Static async generator method as a ClassDeclaration element
esid: prod-AsyncGeneratorMethod
info: |
ClassElement :
static MethodDefinition
MethodDefinition :
AsyncGeneratorMethod
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
features: [async-iteration]
---*/
class C { static async *gen() {
/*{ body }*/
}}

View File

@ -0,0 +1,24 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/async-gen-method-
name: Async generator method as a ClassExpression element
esid: prod-AsyncGeneratorMethod
info: |
ClassElement :
MethodDefinition
MethodDefinition :
AsyncGeneratorMethod
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
features: [async-iteration]
---*/
var C = class { async *gen() {
/*{ body }*/
}};

View File

@ -0,0 +1,24 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/async-gen-method-static-
name: Static async generator method as a ClassExpression element
esid: prod-AsyncGeneratorMethod
info: |
ClassElement :
static MethodDefinition
MethodDefinition :
AsyncGeneratorMethod
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
features: [async-iteration]
---*/
var C = class { static async *gen() {
/*{ body }*/
}};

View File

@ -0,0 +1,19 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/async-generator/
name: Async generator Function declaration
esid: prod-AsyncGeneratorDeclaration
info: |
Async Generator Function Definitions
AsyncGeneratorDeclaration:
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
features: [async-iteration]
---*/
async function *gen() {
/*{ body }*/
}

View File

@ -0,0 +1,19 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/async-generator/named-
name: Named async generator expression
esid: prod-AsyncGeneratorExpression
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
features: [async-iteration]
---*/
var gen = async function *g() {
/*{ body }*/
};

View File

@ -0,0 +1,19 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/async-generator/
name: Unnamed async generator expression
esid: prod-AsyncGeneratorExpression
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
features: [async-iteration]
---*/
var gen = async function *() {
/*{ body }*/
};

View File

@ -0,0 +1,19 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/object/method-definition/async-gen-
name: Async generator method
esid: prod-AsyncGeneratorMethod
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
features: [async-iteration]
---*/
var obj = {
async *method() {
/*{ body }*/
}
};

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var yi\u0065ld;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var yield;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void yi\u0065ld;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void yield;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
yi\u0065ld: ;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
yield: ;

View File

@ -0,0 +1,22 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/gen-method-
name: Generator method as a ClassDeclaration element
esid: prod-GeneratorMethod
info: |
ClassElement :
MethodDefinition
MethodDefinition :
GeneratorMethod
14.4 Generator Function Definitions
GeneratorMethod :
* PropertyName ( UniqueFormalParameters ) { GeneratorBody }
---*/
class C { *gen() {
/*{ body }*/
}}

View File

@ -0,0 +1,22 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/gen-method-static-
name: Static generator method as a ClassDeclaration element
esid: prod-GeneratorMethod
info: |
ClassElement :
static MethodDefinition
MethodDefinition :
GeneratorMethod
14.4 Generator Function Definitions
GeneratorMethod :
* PropertyName ( UniqueFormalParameters ) { GeneratorBody }
---*/
class C {static *gen() {
/*{ body }*/
}}

View File

@ -0,0 +1,22 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/gen-method-
name: Generator method as a ClassExpression element
esid: prod-GeneratorMethod
info: |
ClassElement :
MethodDefinition
MethodDefinition :
GeneratorMethod
14.4 Generator Function Definitions
GeneratorMethod :
* PropertyName ( UniqueFormalParameters ) { GeneratorBody }
---*/
var C = class {*gen() {
/*{ body }*/
}};

View File

@ -0,0 +1,22 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/class/gen-method-static-
name: Static generator method as a ClassExpression element
esid: prod-GeneratorMethod
info: |
ClassElement :
static MethodDefinition
MethodDefinition :
GeneratorMethod
14.4 Generator Function Definitions
GeneratorMethod :
* PropertyName ( UniqueFormalParameters ) { GeneratorBody }
---*/
var C = class { static *gen() {
/*{ body }*/
}};

View File

@ -0,0 +1,16 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/generators/
name: Generator Function declaration
esid: prod-GeneratorDeclaration
info: |
14.4 Generator Function Definitions
GeneratorDeclaration :
function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
---*/
function *gen() {
/*{ body }*/
}

View File

@ -0,0 +1,16 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/generators/named-
name: Named generator expression
esid: prod-GeneratorExpression
info: |
14.4 Generator Function Definitions
GeneratorExpression:
function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody }
---*/
var gen = function *g() {
/*{ body }*/
};

View File

@ -0,0 +1,16 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/generators/
name: Unnamed generator expression
esid: prod-GeneratorExpression
info: |
14.4 Generator Function Definitions
GeneratorExpression:
function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody }
---*/
var gen = function *() {
/*{ body }*/
};

View File

@ -0,0 +1,18 @@
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/object/method-definition/gen-
name: Generator method
esid: prod-GeneratorMethod
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
* PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
---*/
var obj = {
*method() {
/*{ body }*/
}
};

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var yi\u0065ld;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
var yield;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void yi\u0065ld;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
void yield;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
yi\u0065ld: ;

View File

@ -0,0 +1,21 @@
// 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: >
yield 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 [Yield] parameter and
StringValue of Identifier is "yield".
negative:
phase: early
type: SyntaxError
template: syntax
---*/
//- body
yield: ;