diff --git a/src/async-functions/await-as-binding-identifier-escaped.case b/src/async-functions/await-as-binding-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..a17c984567c98aacac2223f6a341e4f4e2e41c4f --- /dev/null +++ b/src/async-functions/await-as-binding-identifier-escaped.case @@ -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; diff --git a/src/async-functions/await-as-binding-identifier.case b/src/async-functions/await-as-binding-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..94105c794a5fbf7e3f13f66ea427daca6284faaa --- /dev/null +++ b/src/async-functions/await-as-binding-identifier.case @@ -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; diff --git a/src/async-functions/await-as-identifier-reference-escaped.case b/src/async-functions/await-as-identifier-reference-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..06a3799eae6362804c92da60f3ae1b09ea7f6c87 --- /dev/null +++ b/src/async-functions/await-as-identifier-reference-escaped.case @@ -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; diff --git a/src/async-functions/await-as-identifier-reference.case b/src/async-functions/await-as-identifier-reference.case new file mode 100644 index 0000000000000000000000000000000000000000..158303b71db4d705a4e562a9e3afe541ba85ce96 --- /dev/null +++ b/src/async-functions/await-as-identifier-reference.case @@ -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; diff --git a/src/async-functions/await-as-label-identifier-escaped.case b/src/async-functions/await-as-label-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..efcb5c394589cd2ecc57e354abef03eeeaa8cf6e --- /dev/null +++ b/src/async-functions/await-as-label-identifier-escaped.case @@ -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: ; diff --git a/src/async-functions/await-as-label-identifier.case b/src/async-functions/await-as-label-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..ba7ba2a7c7a35b7a0a28be08e5a2084230a423d9 --- /dev/null +++ b/src/async-functions/await-as-label-identifier.case @@ -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: ; diff --git a/src/async-functions/syntax/async-arrow.template b/src/async-functions/syntax/async-arrow.template new file mode 100644 index 0000000000000000000000000000000000000000..14ec6f84ccacb62e2b421368e231c4f17c3256bf --- /dev/null +++ b/src/async-functions/syntax/async-arrow.template @@ -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 }*/ +}; diff --git a/src/async-functions/syntax/async-class-decl-method.template b/src/async-functions/syntax/async-class-decl-method.template new file mode 100644 index 0000000000000000000000000000000000000000..812e90199a43e305f0b14cb113edce76e54cbd46 --- /dev/null +++ b/src/async-functions/syntax/async-class-decl-method.template @@ -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 }*/ +}} diff --git a/src/async-functions/syntax/async-class-decl-static-method.template b/src/async-functions/syntax/async-class-decl-static-method.template new file mode 100644 index 0000000000000000000000000000000000000000..e48f5a253c9f0de0f1ded6d2c835c1d4957ad14a --- /dev/null +++ b/src/async-functions/syntax/async-class-decl-static-method.template @@ -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 }*/ +}} diff --git a/src/async-functions/syntax/async-class-expr-method.template b/src/async-functions/syntax/async-class-expr-method.template new file mode 100644 index 0000000000000000000000000000000000000000..9f7a757b33662ad57ca680a19f90e25ef1afdc77 --- /dev/null +++ b/src/async-functions/syntax/async-class-expr-method.template @@ -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 }*/ +}}; diff --git a/src/async-functions/syntax/async-class-expr-static-method.template b/src/async-functions/syntax/async-class-expr-static-method.template new file mode 100644 index 0000000000000000000000000000000000000000..3e7d66391bb30a10ab8d46207a6d85082660267f --- /dev/null +++ b/src/async-functions/syntax/async-class-expr-static-method.template @@ -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 }*/ +}}; diff --git a/src/async-functions/syntax/async-declaration.template b/src/async-functions/syntax/async-declaration.template new file mode 100644 index 0000000000000000000000000000000000000000..b3fcbd43b3c0f688a2b80672d51b9a0ed70fb2b6 --- /dev/null +++ b/src/async-functions/syntax/async-declaration.template @@ -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 }*/ +} diff --git a/src/async-functions/syntax/async-expression-named.template b/src/async-functions/syntax/async-expression-named.template new file mode 100644 index 0000000000000000000000000000000000000000..571d25953c5462f7dcafc1c10f8a2f5fae3ad008 --- /dev/null +++ b/src/async-functions/syntax/async-expression-named.template @@ -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 }*/ +}; diff --git a/src/async-functions/syntax/async-expression.template b/src/async-functions/syntax/async-expression.template new file mode 100644 index 0000000000000000000000000000000000000000..fb0122e35bd6d7e62d85e7a2c6bb3eeccd5c6dd6 --- /dev/null +++ b/src/async-functions/syntax/async-expression.template @@ -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 }*/ +}; diff --git a/src/async-functions/syntax/async-obj-method.template b/src/async-functions/syntax/async-obj-method.template new file mode 100644 index 0000000000000000000000000000000000000000..a01c56fdade28f31386f1a88f9e48d66634ebc54 --- /dev/null +++ b/src/async-functions/syntax/async-obj-method.template @@ -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 }*/ + } +}; diff --git a/src/async-generators/await-as-binding-identifier-escaped.case b/src/async-generators/await-as-binding-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..a17c984567c98aacac2223f6a341e4f4e2e41c4f --- /dev/null +++ b/src/async-generators/await-as-binding-identifier-escaped.case @@ -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; diff --git a/src/async-generators/await-as-binding-identifier.case b/src/async-generators/await-as-binding-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..94105c794a5fbf7e3f13f66ea427daca6284faaa --- /dev/null +++ b/src/async-generators/await-as-binding-identifier.case @@ -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; diff --git a/src/async-generators/await-as-identifier-reference-escaped.case b/src/async-generators/await-as-identifier-reference-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..06a3799eae6362804c92da60f3ae1b09ea7f6c87 --- /dev/null +++ b/src/async-generators/await-as-identifier-reference-escaped.case @@ -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; diff --git a/src/async-generators/await-as-identifier-reference.case b/src/async-generators/await-as-identifier-reference.case new file mode 100644 index 0000000000000000000000000000000000000000..158303b71db4d705a4e562a9e3afe541ba85ce96 --- /dev/null +++ b/src/async-generators/await-as-identifier-reference.case @@ -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; diff --git a/src/async-generators/await-as-label-identifier-escaped.case b/src/async-generators/await-as-label-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..efcb5c394589cd2ecc57e354abef03eeeaa8cf6e --- /dev/null +++ b/src/async-generators/await-as-label-identifier-escaped.case @@ -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: ; diff --git a/src/async-generators/await-as-label-identifier.case b/src/async-generators/await-as-label-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..ba7ba2a7c7a35b7a0a28be08e5a2084230a423d9 --- /dev/null +++ b/src/async-generators/await-as-label-identifier.case @@ -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: ; diff --git a/src/async-generators/syntax/async-class-decl-method.template b/src/async-generators/syntax/async-class-decl-method.template new file mode 100644 index 0000000000000000000000000000000000000000..e6c2a7017da9909ddb17881baae164e298b87664 --- /dev/null +++ b/src/async-generators/syntax/async-class-decl-method.template @@ -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 }*/ +}} diff --git a/src/async-generators/syntax/async-class-decl-static-method.template b/src/async-generators/syntax/async-class-decl-static-method.template new file mode 100644 index 0000000000000000000000000000000000000000..d5872bffe8e606c1cd37cdb7668b7efa456f588e --- /dev/null +++ b/src/async-generators/syntax/async-class-decl-static-method.template @@ -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 }*/ +}} diff --git a/src/async-generators/syntax/async-class-expr-method.template b/src/async-generators/syntax/async-class-expr-method.template new file mode 100644 index 0000000000000000000000000000000000000000..8f0dac898ea40deef9e415841d8bd8789615ad66 --- /dev/null +++ b/src/async-generators/syntax/async-class-expr-method.template @@ -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 }*/ +}}; diff --git a/src/async-generators/syntax/async-class-expr-static-method.template b/src/async-generators/syntax/async-class-expr-static-method.template new file mode 100644 index 0000000000000000000000000000000000000000..aab90d484b9301873a5570ee3243618cffe1a806 --- /dev/null +++ b/src/async-generators/syntax/async-class-expr-static-method.template @@ -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 }*/ +}}; diff --git a/src/async-generators/syntax/async-declaration.template b/src/async-generators/syntax/async-declaration.template new file mode 100644 index 0000000000000000000000000000000000000000..d2a26018cc3eebef609c21d26fb37b1296bf64e5 --- /dev/null +++ b/src/async-generators/syntax/async-declaration.template @@ -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 }*/ +} diff --git a/src/async-generators/syntax/async-expression-named.template b/src/async-generators/syntax/async-expression-named.template new file mode 100644 index 0000000000000000000000000000000000000000..6465d5fa205a19f61365527c2396d72e417d268e --- /dev/null +++ b/src/async-generators/syntax/async-expression-named.template @@ -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 }*/ +}; diff --git a/src/async-generators/syntax/async-expression.template b/src/async-generators/syntax/async-expression.template new file mode 100644 index 0000000000000000000000000000000000000000..eb23634ee87d7ca77799ab4879b1b29c40938ea5 --- /dev/null +++ b/src/async-generators/syntax/async-expression.template @@ -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 }*/ +}; diff --git a/src/async-generators/syntax/async-obj-method.template b/src/async-generators/syntax/async-obj-method.template new file mode 100644 index 0000000000000000000000000000000000000000..85848c2f6d7c0855cc6a63ea123033b370ab3388 --- /dev/null +++ b/src/async-generators/syntax/async-obj-method.template @@ -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 }*/ + } +}; diff --git a/src/async-generators/yield-as-binding-identifier-escaped.case b/src/async-generators/yield-as-binding-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..824622585b6cae0122468b2500033f352fe0372c --- /dev/null +++ b/src/async-generators/yield-as-binding-identifier-escaped.case @@ -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; diff --git a/src/async-generators/yield-as-binding-identifier.case b/src/async-generators/yield-as-binding-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..e66e47a80fb41a9f15a20fff79bf8b9bda54de7d --- /dev/null +++ b/src/async-generators/yield-as-binding-identifier.case @@ -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; diff --git a/src/async-generators/yield-as-identifier-reference-escaped.case b/src/async-generators/yield-as-identifier-reference-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..13bbc6c1c7f70cde5b62b0387fb4548243d85b3b --- /dev/null +++ b/src/async-generators/yield-as-identifier-reference-escaped.case @@ -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; diff --git a/src/async-generators/yield-as-identifier-reference.case b/src/async-generators/yield-as-identifier-reference.case new file mode 100644 index 0000000000000000000000000000000000000000..35f6cfa41ff64907c28b91402f8ccd74c1b205f6 --- /dev/null +++ b/src/async-generators/yield-as-identifier-reference.case @@ -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; diff --git a/src/async-generators/yield-as-label-identifier-escaped.case b/src/async-generators/yield-as-label-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..0da82aaff4c23c08b0ad26994e76d7b175a920a2 --- /dev/null +++ b/src/async-generators/yield-as-label-identifier-escaped.case @@ -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: ; diff --git a/src/async-generators/yield-as-label-identifier.case b/src/async-generators/yield-as-label-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..49665658aac72cd05cf0a03c44a60878b110eaf2 --- /dev/null +++ b/src/async-generators/yield-as-label-identifier.case @@ -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: ; diff --git a/src/generators/syntax/class-decl-method.template b/src/generators/syntax/class-decl-method.template new file mode 100644 index 0000000000000000000000000000000000000000..0dd8b66afb1c8cd2672e37dfa32b3e32447f4e12 --- /dev/null +++ b/src/generators/syntax/class-decl-method.template @@ -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 }*/ +}} diff --git a/src/generators/syntax/class-decl-static-method.template b/src/generators/syntax/class-decl-static-method.template new file mode 100644 index 0000000000000000000000000000000000000000..217e854914b1a4536c1578fe363f7f2c47fe8865 --- /dev/null +++ b/src/generators/syntax/class-decl-static-method.template @@ -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 }*/ +}} diff --git a/src/generators/syntax/class-expr-method.template b/src/generators/syntax/class-expr-method.template new file mode 100644 index 0000000000000000000000000000000000000000..9ee72a08d96c5ad66df96acae099f4830d59d464 --- /dev/null +++ b/src/generators/syntax/class-expr-method.template @@ -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 }*/ +}}; diff --git a/src/generators/syntax/class-expr-static-method.template b/src/generators/syntax/class-expr-static-method.template new file mode 100644 index 0000000000000000000000000000000000000000..c6dd24225a278673fd9532ae381b201d0b6cef42 --- /dev/null +++ b/src/generators/syntax/class-expr-static-method.template @@ -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 }*/ +}}; diff --git a/src/generators/syntax/declaration.template b/src/generators/syntax/declaration.template new file mode 100644 index 0000000000000000000000000000000000000000..99b003f28cd9a8e53913832172c531f81ee18494 --- /dev/null +++ b/src/generators/syntax/declaration.template @@ -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 }*/ +} diff --git a/src/generators/syntax/expression-named.template b/src/generators/syntax/expression-named.template new file mode 100644 index 0000000000000000000000000000000000000000..17cd90d224d225d26fc1129c42e2e8d5925bdb24 --- /dev/null +++ b/src/generators/syntax/expression-named.template @@ -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 }*/ +}; diff --git a/src/generators/syntax/expression.template b/src/generators/syntax/expression.template new file mode 100644 index 0000000000000000000000000000000000000000..03622695d3f4fc1fbf2eea83f55b1be3180f96cf --- /dev/null +++ b/src/generators/syntax/expression.template @@ -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 }*/ +}; diff --git a/src/generators/syntax/obj-method.template b/src/generators/syntax/obj-method.template new file mode 100644 index 0000000000000000000000000000000000000000..4da204356604279ac4a15e3281d9166f76c1d8af --- /dev/null +++ b/src/generators/syntax/obj-method.template @@ -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 }*/ + } +}; diff --git a/src/generators/yield-as-binding-identifier-escaped.case b/src/generators/yield-as-binding-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..824622585b6cae0122468b2500033f352fe0372c --- /dev/null +++ b/src/generators/yield-as-binding-identifier-escaped.case @@ -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; diff --git a/src/generators/yield-as-binding-identifier.case b/src/generators/yield-as-binding-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..e66e47a80fb41a9f15a20fff79bf8b9bda54de7d --- /dev/null +++ b/src/generators/yield-as-binding-identifier.case @@ -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; diff --git a/src/generators/yield-as-identifier-reference-escaped.case b/src/generators/yield-as-identifier-reference-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..13bbc6c1c7f70cde5b62b0387fb4548243d85b3b --- /dev/null +++ b/src/generators/yield-as-identifier-reference-escaped.case @@ -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; diff --git a/src/generators/yield-as-identifier-reference.case b/src/generators/yield-as-identifier-reference.case new file mode 100644 index 0000000000000000000000000000000000000000..35f6cfa41ff64907c28b91402f8ccd74c1b205f6 --- /dev/null +++ b/src/generators/yield-as-identifier-reference.case @@ -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; diff --git a/src/generators/yield-as-label-identifier-escaped.case b/src/generators/yield-as-label-identifier-escaped.case new file mode 100644 index 0000000000000000000000000000000000000000..0da82aaff4c23c08b0ad26994e76d7b175a920a2 --- /dev/null +++ b/src/generators/yield-as-label-identifier-escaped.case @@ -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: ; diff --git a/src/generators/yield-as-label-identifier.case b/src/generators/yield-as-label-identifier.case new file mode 100644 index 0000000000000000000000000000000000000000..49665658aac72cd05cf0a03c44a60878b110eaf2 --- /dev/null +++ b/src/generators/yield-as-label-identifier.case @@ -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: ;