mirror of
https://github.com/tc39/test262.git
synced 2025-07-29 00:44:32 +02:00
Merge pull request #1017 from anba/expr-lookahead-restr
Expression statement lookahead restriction and identifier tests
This commit is contained in:
commit
ed714d702a
21
src/async-functions/await-as-binding-identifier-escaped.case
Normal file
21
src/async-functions/await-as-binding-identifier-escaped.case
Normal 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;
|
21
src/async-functions/await-as-binding-identifier.case
Normal file
21
src/async-functions/await-as-binding-identifier.case
Normal 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;
|
@ -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;
|
21
src/async-functions/await-as-identifier-reference.case
Normal file
21
src/async-functions/await-as-identifier-reference.case
Normal 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;
|
21
src/async-functions/await-as-label-identifier-escaped.case
Normal file
21
src/async-functions/await-as-label-identifier-escaped.case
Normal 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: ;
|
21
src/async-functions/await-as-label-identifier.case
Normal file
21
src/async-functions/await-as-label-identifier.case
Normal 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: ;
|
22
src/async-functions/syntax/async-arrow.template
Normal file
22
src/async-functions/syntax/async-arrow.template
Normal 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 }*/
|
||||||
|
};
|
24
src/async-functions/syntax/async-class-decl-method.template
Normal file
24
src/async-functions/syntax/async-class-decl-method.template
Normal 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 }*/
|
||||||
|
}}
|
@ -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 }*/
|
||||||
|
}}
|
24
src/async-functions/syntax/async-class-expr-method.template
Normal file
24
src/async-functions/syntax/async-class-expr-method.template
Normal 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 }*/
|
||||||
|
}};
|
@ -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 }*/
|
||||||
|
}};
|
18
src/async-functions/syntax/async-declaration.template
Normal file
18
src/async-functions/syntax/async-declaration.template
Normal 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 }*/
|
||||||
|
}
|
18
src/async-functions/syntax/async-expression-named.template
Normal file
18
src/async-functions/syntax/async-expression-named.template
Normal 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 }*/
|
||||||
|
};
|
18
src/async-functions/syntax/async-expression.template
Normal file
18
src/async-functions/syntax/async-expression.template
Normal 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 }*/
|
||||||
|
};
|
20
src/async-functions/syntax/async-obj-method.template
Normal file
20
src/async-functions/syntax/async-obj-method.template
Normal 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 }*/
|
||||||
|
}
|
||||||
|
};
|
@ -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;
|
21
src/async-generators/await-as-binding-identifier.case
Normal file
21
src/async-generators/await-as-binding-identifier.case
Normal 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;
|
@ -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;
|
21
src/async-generators/await-as-identifier-reference.case
Normal file
21
src/async-generators/await-as-identifier-reference.case
Normal 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;
|
21
src/async-generators/await-as-label-identifier-escaped.case
Normal file
21
src/async-generators/await-as-label-identifier-escaped.case
Normal 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: ;
|
21
src/async-generators/await-as-label-identifier.case
Normal file
21
src/async-generators/await-as-label-identifier.case
Normal 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: ;
|
24
src/async-generators/syntax/async-class-decl-method.template
Normal file
24
src/async-generators/syntax/async-class-decl-method.template
Normal 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 }*/
|
||||||
|
}}
|
@ -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 }*/
|
||||||
|
}}
|
24
src/async-generators/syntax/async-class-expr-method.template
Normal file
24
src/async-generators/syntax/async-class-expr-method.template
Normal 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 }*/
|
||||||
|
}};
|
@ -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 }*/
|
||||||
|
}};
|
19
src/async-generators/syntax/async-declaration.template
Normal file
19
src/async-generators/syntax/async-declaration.template
Normal 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 }*/
|
||||||
|
}
|
19
src/async-generators/syntax/async-expression-named.template
Normal file
19
src/async-generators/syntax/async-expression-named.template
Normal 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 }*/
|
||||||
|
};
|
19
src/async-generators/syntax/async-expression.template
Normal file
19
src/async-generators/syntax/async-expression.template
Normal 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 }*/
|
||||||
|
};
|
19
src/async-generators/syntax/async-obj-method.template
Normal file
19
src/async-generators/syntax/async-obj-method.template
Normal 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 }*/
|
||||||
|
}
|
||||||
|
};
|
@ -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;
|
21
src/async-generators/yield-as-binding-identifier.case
Normal file
21
src/async-generators/yield-as-binding-identifier.case
Normal 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;
|
@ -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;
|
21
src/async-generators/yield-as-identifier-reference.case
Normal file
21
src/async-generators/yield-as-identifier-reference.case
Normal 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;
|
21
src/async-generators/yield-as-label-identifier-escaped.case
Normal file
21
src/async-generators/yield-as-label-identifier-escaped.case
Normal 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: ;
|
21
src/async-generators/yield-as-label-identifier.case
Normal file
21
src/async-generators/yield-as-label-identifier.case
Normal 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: ;
|
22
src/generators/syntax/class-decl-method.template
Normal file
22
src/generators/syntax/class-decl-method.template
Normal 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 }*/
|
||||||
|
}}
|
22
src/generators/syntax/class-decl-static-method.template
Normal file
22
src/generators/syntax/class-decl-static-method.template
Normal 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 }*/
|
||||||
|
}}
|
22
src/generators/syntax/class-expr-method.template
Normal file
22
src/generators/syntax/class-expr-method.template
Normal 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 }*/
|
||||||
|
}};
|
22
src/generators/syntax/class-expr-static-method.template
Normal file
22
src/generators/syntax/class-expr-static-method.template
Normal 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 }*/
|
||||||
|
}};
|
16
src/generators/syntax/declaration.template
Normal file
16
src/generators/syntax/declaration.template
Normal 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 }*/
|
||||||
|
}
|
16
src/generators/syntax/expression-named.template
Normal file
16
src/generators/syntax/expression-named.template
Normal 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 }*/
|
||||||
|
};
|
16
src/generators/syntax/expression.template
Normal file
16
src/generators/syntax/expression.template
Normal 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 }*/
|
||||||
|
};
|
18
src/generators/syntax/obj-method.template
Normal file
18
src/generators/syntax/obj-method.template
Normal 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 }*/
|
||||||
|
}
|
||||||
|
};
|
21
src/generators/yield-as-binding-identifier-escaped.case
Normal file
21
src/generators/yield-as-binding-identifier-escaped.case
Normal 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;
|
21
src/generators/yield-as-binding-identifier.case
Normal file
21
src/generators/yield-as-binding-identifier.case
Normal 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;
|
21
src/generators/yield-as-identifier-reference-escaped.case
Normal file
21
src/generators/yield-as-identifier-reference-escaped.case
Normal 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;
|
21
src/generators/yield-as-identifier-reference.case
Normal file
21
src/generators/yield-as-identifier-reference.case
Normal 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;
|
21
src/generators/yield-as-label-identifier-escaped.case
Normal file
21
src/generators/yield-as-label-identifier-escaped.case
Normal 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: ;
|
21
src/generators/yield-as-label-identifier.case
Normal file
21
src/generators/yield-as-label-identifier.case
Normal 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: ;
|
@ -9,3 +9,4 @@ flags: [noStrict]
|
|||||||
---*/
|
---*/
|
||||||
label: function g() {}
|
label: function g() {}
|
||||||
|
|
||||||
|
label1: label2: function f() {}
|
||||||
|
23
test/language/export/escaped-as-export-specifier.js
Normal file
23
test/language/export/escaped-as-export-specifier.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-grammar-notation
|
||||||
|
description: >
|
||||||
|
The `as` contextual keyword must not contain Unicode escape sequences.
|
||||||
|
info: >
|
||||||
|
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
|
||||||
|
in fixed width font, both in the productions of the grammars and throughout this
|
||||||
|
specification whenever the text directly refers to such a terminal symbol. These
|
||||||
|
are to appear in a script exactly as written. All terminal symbol code points
|
||||||
|
specified in this way are to be understood as the appropriate Unicode code points
|
||||||
|
from the Basic Latin range, as opposed to any similar-looking code points from
|
||||||
|
other Unicode ranges.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
export var a = 0;
|
||||||
|
export {a \u0061s b} from "./escaped-as-export-specifier.js";
|
22
test/language/export/escaped-default.js
Normal file
22
test/language/export/escaped-default.js
Normal 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.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-grammar-notation
|
||||||
|
description: >
|
||||||
|
The `default` keyword must not contain Unicode escape sequences.
|
||||||
|
info: >
|
||||||
|
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
|
||||||
|
in fixed width font, both in the productions of the grammars and throughout this
|
||||||
|
specification whenever the text directly refers to such a terminal symbol. These
|
||||||
|
are to appear in a script exactly as written. All terminal symbol code points
|
||||||
|
specified in this way are to be understood as the appropriate Unicode code points
|
||||||
|
from the Basic Latin range, as opposed to any similar-looking code points from
|
||||||
|
other Unicode ranges.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
export d\u0065fault 0;
|
22
test/language/export/escaped-from.js
Normal file
22
test/language/export/escaped-from.js
Normal 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.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-grammar-notation
|
||||||
|
description: >
|
||||||
|
The `from` contextual keyword must not contain Unicode escape sequences.
|
||||||
|
info: >
|
||||||
|
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
|
||||||
|
in fixed width font, both in the productions of the grammars and throughout this
|
||||||
|
specification whenever the text directly refers to such a terminal symbol. These
|
||||||
|
are to appear in a script exactly as written. All terminal symbol code points
|
||||||
|
specified in this way are to be understood as the appropriate Unicode code points
|
||||||
|
from the Basic Latin range, as opposed to any similar-looking code points from
|
||||||
|
other Unicode ranges.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
export {} \u0066rom "./escaped-from.js";
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: PutValue operates only on references (see step 1)
|
|
||||||
es5id: 11.13.1-1-1
|
|
||||||
description: >
|
|
||||||
simple assignment throws ReferenceError if LeftHandSide is not a
|
|
||||||
reference (number)
|
|
||||||
---*/
|
|
||||||
|
|
||||||
|
|
||||||
assert.throws(ReferenceError, function() {
|
|
||||||
eval("42 = 42");
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: PutValue operates only on references (see step 1).
|
|
||||||
es5id: 11.13.1-1-2
|
|
||||||
description: >
|
|
||||||
simple assignment throws ReferenceError if LeftHandSide is not a
|
|
||||||
reference (string)
|
|
||||||
---*/
|
|
||||||
|
|
||||||
|
|
||||||
assert.throws(ReferenceError, function() {
|
|
||||||
eval("'x' = 42");
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: PutValue operates only on references (see step 1).
|
|
||||||
es5id: 11.13.1-1-3
|
|
||||||
description: >
|
|
||||||
simple assignment throws ReferenceError if LeftHandSide is not a
|
|
||||||
reference (boolean)
|
|
||||||
---*/
|
|
||||||
|
|
||||||
|
|
||||||
assert.throws(ReferenceError, function() {
|
|
||||||
eval("true = 42");
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
info: PutValue operates only on references (see step 1).
|
|
||||||
es5id: 11.13.1-1-4
|
|
||||||
description: >
|
|
||||||
simple assignment throws ReferenceError if LeftHandSide is not a
|
|
||||||
reference (null)
|
|
||||||
---*/
|
|
||||||
|
|
||||||
|
|
||||||
assert.throws(ReferenceError, function() {
|
|
||||||
eval("null = 42");
|
|
||||||
});
|
|
21
test/language/expressions/assignment/target-boolean.js
Normal file
21
test/language/expressions/assignment/target-boolean.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-assignment-operators-static-semantics-early-errors
|
||||||
|
es5id: 11.13.1-1-3
|
||||||
|
description: >
|
||||||
|
simple assignment throws ReferenceError if LeftHandSide is not a
|
||||||
|
reference (boolean)
|
||||||
|
info: |
|
||||||
|
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
|
||||||
|
|
||||||
|
It is an early Reference Error if LeftHandSideExpression is neither an
|
||||||
|
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
|
||||||
|
LeftHandSideExpression is false.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: ReferenceError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
true = 42;
|
21
test/language/expressions/assignment/target-null.js
Normal file
21
test/language/expressions/assignment/target-null.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-assignment-operators-static-semantics-early-errors
|
||||||
|
es5id: 11.13.1-1-4
|
||||||
|
description: >
|
||||||
|
simple assignment throws ReferenceError if LeftHandSide is not a
|
||||||
|
reference (null)
|
||||||
|
info: |
|
||||||
|
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
|
||||||
|
|
||||||
|
It is an early Reference Error if LeftHandSideExpression is neither an
|
||||||
|
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
|
||||||
|
LeftHandSideExpression is false.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: ReferenceError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
null = 42;
|
21
test/language/expressions/assignment/target-number.js
Normal file
21
test/language/expressions/assignment/target-number.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-assignment-operators-static-semantics-early-errors
|
||||||
|
es5id: 11.13.1-1-1
|
||||||
|
description: >
|
||||||
|
simple assignment throws ReferenceError if LeftHandSide is not a
|
||||||
|
reference (number)
|
||||||
|
info: |
|
||||||
|
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
|
||||||
|
|
||||||
|
It is an early Reference Error if LeftHandSideExpression is neither an
|
||||||
|
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
|
||||||
|
LeftHandSideExpression is false.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: ReferenceError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
42 = 42;
|
21
test/language/expressions/assignment/target-string.js
Normal file
21
test/language/expressions/assignment/target-string.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-assignment-operators-static-semantics-early-errors
|
||||||
|
es5id: 11.13.1-1-2
|
||||||
|
description: >
|
||||||
|
simple assignment throws ReferenceError if LeftHandSide is not a
|
||||||
|
reference (string)
|
||||||
|
info: |
|
||||||
|
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
|
||||||
|
|
||||||
|
It is an early Reference Error if LeftHandSideExpression is neither an
|
||||||
|
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
|
||||||
|
LeftHandSideExpression is false.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: ReferenceError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
'x' = 42;
|
@ -0,0 +1,33 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-binding-identifier-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-arrow.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async arrow function)
|
||||||
|
esid: prod-AsyncArrowFunction
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
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 }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
async() => {
|
||||||
|
var \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,33 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-binding-identifier.case
|
||||||
|
// - src/async-functions/syntax/async-arrow.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async arrow function)
|
||||||
|
esid: prod-AsyncArrowFunction
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
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 }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
async() => {
|
||||||
|
var await;
|
||||||
|
};
|
@ -0,0 +1,33 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-identifier-reference-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-arrow.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async arrow function)
|
||||||
|
esid: prod-AsyncArrowFunction
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
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 }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
async() => {
|
||||||
|
void \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,33 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-identifier-reference.case
|
||||||
|
// - src/async-functions/syntax/async-arrow.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async arrow function)
|
||||||
|
esid: prod-AsyncArrowFunction
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
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 }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
async() => {
|
||||||
|
void await;
|
||||||
|
};
|
@ -0,0 +1,33 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-label-identifier-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-arrow.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async arrow function)
|
||||||
|
esid: prod-AsyncArrowFunction
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
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 }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
async() => {
|
||||||
|
\u0061wait: ;
|
||||||
|
};
|
@ -0,0 +1,33 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-label-identifier.case
|
||||||
|
// - src/async-functions/syntax/async-arrow.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async arrow function)
|
||||||
|
esid: prod-AsyncArrowFunction
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
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 }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
async() => {
|
||||||
|
await: ;
|
||||||
|
};
|
@ -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.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-grammar-notation
|
||||||
|
description: >
|
||||||
|
The `async` contextual keyword must not contain Unicode escape sequences.
|
||||||
|
info: >
|
||||||
|
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
|
||||||
|
in fixed width font, both in the productions of the grammars and throughout this
|
||||||
|
specification whenever the text directly refers to such a terminal symbol. These
|
||||||
|
are to appear in a script exactly as written. All terminal symbol code points
|
||||||
|
specified in this way are to be understood as the appropriate Unicode code points
|
||||||
|
from the Basic Latin range, as opposed to any similar-looking code points from
|
||||||
|
other Unicode ranges.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
features: [async-functions]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
\u0061sync () => {}
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-binding-identifier-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function () {
|
||||||
|
var \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-binding-identifier.case
|
||||||
|
// - src/async-functions/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function () {
|
||||||
|
var await;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-identifier-reference-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function () {
|
||||||
|
void \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-identifier-reference.case
|
||||||
|
// - src/async-functions/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function () {
|
||||||
|
void await;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-label-identifier-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function () {
|
||||||
|
\u0061wait: ;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-label-identifier.case
|
||||||
|
// - src/async-functions/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function () {
|
||||||
|
await: ;
|
||||||
|
};
|
22
test/language/expressions/async-function/escaped-async.js
Normal file
22
test/language/expressions/async-function/escaped-async.js
Normal 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.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-grammar-notation
|
||||||
|
description: >
|
||||||
|
The `async` contextual keyword must not contain Unicode escape sequences.
|
||||||
|
info: >
|
||||||
|
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
|
||||||
|
in fixed width font, both in the productions of the grammars and throughout this
|
||||||
|
specification whenever the text directly refers to such a terminal symbol. These
|
||||||
|
are to appear in a script exactly as written. All terminal symbol code points
|
||||||
|
specified in this way are to be understood as the appropriate Unicode code points
|
||||||
|
from the Basic Latin range, as opposed to any similar-looking code points from
|
||||||
|
other Unicode ranges.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
features: [async-functions]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
void \u0061sync function f(){}
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-binding-identifier-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function fn() {
|
||||||
|
var \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-binding-identifier.case
|
||||||
|
// - src/async-functions/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function fn() {
|
||||||
|
var await;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-identifier-reference-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function fn() {
|
||||||
|
void \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-identifier-reference.case
|
||||||
|
// - src/async-functions/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function fn() {
|
||||||
|
void await;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-label-identifier-escaped.case
|
||||||
|
// - src/async-functions/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function fn() {
|
||||||
|
\u0061wait: ;
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-functions/await-as-label-identifier.case
|
||||||
|
// - src/async-functions/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async function expression)
|
||||||
|
esid: prod-AsyncFunctionExpression
|
||||||
|
features: [async-functions]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Function Definitions
|
||||||
|
|
||||||
|
AsyncFunctionExpression :
|
||||||
|
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var fn = async function fn() {
|
||||||
|
await: ;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-binding-identifier-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *() {
|
||||||
|
var \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-binding-identifier.case
|
||||||
|
// - src/async-generators/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *() {
|
||||||
|
var await;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-identifier-reference-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *() {
|
||||||
|
void \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-identifier-reference.case
|
||||||
|
// - src/async-generators/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *() {
|
||||||
|
void await;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-label-identifier-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *() {
|
||||||
|
\u0061wait: ;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-label-identifier.case
|
||||||
|
// - src/async-generators/syntax/async-expression.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *() {
|
||||||
|
await: ;
|
||||||
|
};
|
22
test/language/expressions/async-generator/escaped-async.js
Normal file
22
test/language/expressions/async-generator/escaped-async.js
Normal 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.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
esid: sec-grammar-notation
|
||||||
|
description: >
|
||||||
|
The `async` contextual keyword must not contain Unicode escape sequences.
|
||||||
|
info: >
|
||||||
|
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
|
||||||
|
in fixed width font, both in the productions of the grammars and throughout this
|
||||||
|
specification whenever the text directly refers to such a terminal symbol. These
|
||||||
|
are to appear in a script exactly as written. All terminal symbol code points
|
||||||
|
specified in this way are to be understood as the appropriate Unicode code points
|
||||||
|
from the Basic Latin range, as opposed to any similar-looking code points from
|
||||||
|
other Unicode ranges.
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
features: [async-iteration]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
void \u0061sync function* f(){};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-binding-identifier-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
var \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-binding-identifier.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
var await;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-identifier-reference-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
void \u0061wait;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-identifier-reference.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
void await;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-label-identifier-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
\u0061wait: ;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/await-as-label-identifier.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Await] parameter and
|
||||||
|
StringValue of Identifier is "await".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
await: ;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/yield-as-binding-identifier-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Yield] parameter and
|
||||||
|
StringValue of Identifier is "yield".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
var yi\u0065ld;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/yield-as-binding-identifier.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
BindingIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Yield] parameter and
|
||||||
|
StringValue of Identifier is "yield".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
var yield;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/yield-as-identifier-reference-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Yield] parameter and
|
||||||
|
StringValue of Identifier is "yield".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
void yi\u0065ld;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/yield-as-identifier-reference.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
IdentifierReference : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Yield] parameter and
|
||||||
|
StringValue of Identifier is "yield".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
void yield;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/yield-as-label-identifier-escaped.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Yield] parameter and
|
||||||
|
StringValue of Identifier is "yield".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
yi\u0065ld: ;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/async-generators/yield-as-label-identifier.case
|
||||||
|
// - src/async-generators/syntax/async-expression-named.template
|
||||||
|
/*---
|
||||||
|
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
|
||||||
|
esid: prod-AsyncGeneratorExpression
|
||||||
|
features: [async-iteration]
|
||||||
|
flags: [generated]
|
||||||
|
negative:
|
||||||
|
phase: early
|
||||||
|
type: SyntaxError
|
||||||
|
info: |
|
||||||
|
Async Generator Function Definitions
|
||||||
|
|
||||||
|
AsyncGeneratorExpression :
|
||||||
|
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
|
||||||
|
AsyncGeneratorBody }
|
||||||
|
|
||||||
|
|
||||||
|
LabelIdentifier : Identifier
|
||||||
|
|
||||||
|
It is a Syntax Error if this production has a [Yield] parameter and
|
||||||
|
StringValue of Identifier is "yield".
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var gen = async function *g() {
|
||||||
|
yield: ;
|
||||||
|
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user