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 0000000000..a17c984567 --- /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 0000000000..94105c794a --- /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 0000000000..06a3799eae --- /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 0000000000..158303b71d --- /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 0000000000..efcb5c3945 --- /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 0000000000..ba7ba2a7c7 --- /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 0000000000..14ec6f84cc --- /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 0000000000..812e90199a --- /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 0000000000..e48f5a253c --- /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 0000000000..9f7a757b33 --- /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 0000000000..3e7d66391b --- /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 0000000000..b3fcbd43b3 --- /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 0000000000..571d25953c --- /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 0000000000..fb0122e35b --- /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 0000000000..a01c56fdad --- /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 0000000000..a17c984567 --- /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 0000000000..94105c794a --- /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 0000000000..06a3799eae --- /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 0000000000..158303b71d --- /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 0000000000..efcb5c3945 --- /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 0000000000..ba7ba2a7c7 --- /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 0000000000..e6c2a7017d --- /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 0000000000..d5872bffe8 --- /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 0000000000..8f0dac898e --- /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 0000000000..aab90d484b --- /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 0000000000..d2a26018cc --- /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 0000000000..6465d5fa20 --- /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 0000000000..eb23634ee8 --- /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 0000000000..85848c2f6d --- /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 0000000000..824622585b --- /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 0000000000..e66e47a80f --- /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 0000000000..13bbc6c1c7 --- /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 0000000000..35f6cfa41f --- /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 0000000000..0da82aaff4 --- /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 0000000000..49665658aa --- /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 0000000000..0dd8b66afb --- /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 0000000000..217e854914 --- /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 0000000000..9ee72a08d9 --- /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 0000000000..c6dd24225a --- /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 0000000000..99b003f28c --- /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 0000000000..17cd90d224 --- /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 0000000000..03622695d3 --- /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 0000000000..4da2043566 --- /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 0000000000..824622585b --- /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 0000000000..e66e47a80f --- /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 0000000000..13bbc6c1c7 --- /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 0000000000..35f6cfa41f --- /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 0000000000..0da82aaff4 --- /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 0000000000..49665658aa --- /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: ; diff --git a/test/annexB/language/statements/labeled/function-declaration.js b/test/annexB/language/statements/labeled/function-declaration.js index 86eb59042b..d93df289b9 100644 --- a/test/annexB/language/statements/labeled/function-declaration.js +++ b/test/annexB/language/statements/labeled/function-declaration.js @@ -9,3 +9,4 @@ flags: [noStrict] ---*/ label: function g() {} +label1: label2: function f() {} diff --git a/test/language/export/escaped-as-export-specifier.js b/test/language/export/escaped-as-export-specifier.js new file mode 100644 index 0000000000..c7841c8b29 --- /dev/null +++ b/test/language/export/escaped-as-export-specifier.js @@ -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"; diff --git a/test/language/export/escaped-default.js b/test/language/export/escaped-default.js new file mode 100644 index 0000000000..3e637df5a9 --- /dev/null +++ b/test/language/export/escaped-default.js @@ -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; diff --git a/test/language/export/escaped-from.js b/test/language/export/escaped-from.js new file mode 100644 index 0000000000..af3158a85e --- /dev/null +++ b/test/language/export/escaped-from.js @@ -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"; diff --git a/test/language/expressions/assignment/11.13.1-1-1.js b/test/language/expressions/assignment/11.13.1-1-1.js deleted file mode 100644 index 5bc0891b15..0000000000 --- a/test/language/expressions/assignment/11.13.1-1-1.js +++ /dev/null @@ -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"); -}); diff --git a/test/language/expressions/assignment/11.13.1-1-2.js b/test/language/expressions/assignment/11.13.1-1-2.js deleted file mode 100644 index 8f42ba35b2..0000000000 --- a/test/language/expressions/assignment/11.13.1-1-2.js +++ /dev/null @@ -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"); -}); diff --git a/test/language/expressions/assignment/11.13.1-1-3.js b/test/language/expressions/assignment/11.13.1-1-3.js deleted file mode 100644 index 196821e97b..0000000000 --- a/test/language/expressions/assignment/11.13.1-1-3.js +++ /dev/null @@ -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"); -}); diff --git a/test/language/expressions/assignment/11.13.1-1-4.js b/test/language/expressions/assignment/11.13.1-1-4.js deleted file mode 100644 index 4a5cb16340..0000000000 --- a/test/language/expressions/assignment/11.13.1-1-4.js +++ /dev/null @@ -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"); -}); diff --git a/test/language/expressions/assignment/target-boolean.js b/test/language/expressions/assignment/target-boolean.js new file mode 100644 index 0000000000..2022f02120 --- /dev/null +++ b/test/language/expressions/assignment/target-boolean.js @@ -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; diff --git a/test/language/expressions/assignment/target-null.js b/test/language/expressions/assignment/target-null.js new file mode 100644 index 0000000000..2b51226a37 --- /dev/null +++ b/test/language/expressions/assignment/target-null.js @@ -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; diff --git a/test/language/expressions/assignment/target-number.js b/test/language/expressions/assignment/target-number.js new file mode 100644 index 0000000000..7301d805ae --- /dev/null +++ b/test/language/expressions/assignment/target-number.js @@ -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; diff --git a/test/language/expressions/assignment/target-string.js b/test/language/expressions/assignment/target-string.js new file mode 100644 index 0000000000..ef0c984e88 --- /dev/null +++ b/test/language/expressions/assignment/target-string.js @@ -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; diff --git a/test/language/expressions/async-arrow-function/await-as-binding-identifier-escaped.js b/test/language/expressions/async-arrow-function/await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..46e22c18ad --- /dev/null +++ b/test/language/expressions/async-arrow-function/await-as-binding-identifier-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-arrow-function/await-as-binding-identifier.js b/test/language/expressions/async-arrow-function/await-as-binding-identifier.js new file mode 100644 index 0000000000..22e12e6d9b --- /dev/null +++ b/test/language/expressions/async-arrow-function/await-as-binding-identifier.js @@ -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; +}; diff --git a/test/language/expressions/async-arrow-function/await-as-identifier-reference-escaped.js b/test/language/expressions/async-arrow-function/await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..367aef8697 --- /dev/null +++ b/test/language/expressions/async-arrow-function/await-as-identifier-reference-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-arrow-function/await-as-identifier-reference.js b/test/language/expressions/async-arrow-function/await-as-identifier-reference.js new file mode 100644 index 0000000000..8fd7b11790 --- /dev/null +++ b/test/language/expressions/async-arrow-function/await-as-identifier-reference.js @@ -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; +}; diff --git a/test/language/expressions/async-arrow-function/await-as-label-identifier-escaped.js b/test/language/expressions/async-arrow-function/await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..d7388ccb71 --- /dev/null +++ b/test/language/expressions/async-arrow-function/await-as-label-identifier-escaped.js @@ -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: ; +}; diff --git a/test/language/expressions/async-arrow-function/await-as-label-identifier.js b/test/language/expressions/async-arrow-function/await-as-label-identifier.js new file mode 100644 index 0000000000..2e5179d101 --- /dev/null +++ b/test/language/expressions/async-arrow-function/await-as-label-identifier.js @@ -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: ; +}; diff --git a/test/language/expressions/async-arrow-function/escaped-async.js b/test/language/expressions/async-arrow-function/escaped-async.js new file mode 100644 index 0000000000..cb804860ba --- /dev/null +++ b/test/language/expressions/async-arrow-function/escaped-async.js @@ -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 () => {} diff --git a/test/language/expressions/async-function/await-as-binding-identifier-escaped.js b/test/language/expressions/async-function/await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..0fc65cad79 --- /dev/null +++ b/test/language/expressions/async-function/await-as-binding-identifier-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-function/await-as-binding-identifier.js b/test/language/expressions/async-function/await-as-binding-identifier.js new file mode 100644 index 0000000000..021b32daad --- /dev/null +++ b/test/language/expressions/async-function/await-as-binding-identifier.js @@ -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; +}; diff --git a/test/language/expressions/async-function/await-as-identifier-reference-escaped.js b/test/language/expressions/async-function/await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..d704a19b31 --- /dev/null +++ b/test/language/expressions/async-function/await-as-identifier-reference-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-function/await-as-identifier-reference.js b/test/language/expressions/async-function/await-as-identifier-reference.js new file mode 100644 index 0000000000..3d0b849cd9 --- /dev/null +++ b/test/language/expressions/async-function/await-as-identifier-reference.js @@ -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; +}; diff --git a/test/language/expressions/async-function/await-as-label-identifier-escaped.js b/test/language/expressions/async-function/await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..a6bb9d96f9 --- /dev/null +++ b/test/language/expressions/async-function/await-as-label-identifier-escaped.js @@ -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: ; +}; diff --git a/test/language/expressions/async-function/await-as-label-identifier.js b/test/language/expressions/async-function/await-as-label-identifier.js new file mode 100644 index 0000000000..30720d1426 --- /dev/null +++ b/test/language/expressions/async-function/await-as-label-identifier.js @@ -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: ; +}; diff --git a/test/language/expressions/async-function/escaped-async.js b/test/language/expressions/async-function/escaped-async.js new file mode 100644 index 0000000000..9fed934456 --- /dev/null +++ b/test/language/expressions/async-function/escaped-async.js @@ -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(){} diff --git a/test/language/expressions/async-function/named-await-as-binding-identifier-escaped.js b/test/language/expressions/async-function/named-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..e2fd346451 --- /dev/null +++ b/test/language/expressions/async-function/named-await-as-binding-identifier-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-function/named-await-as-binding-identifier.js b/test/language/expressions/async-function/named-await-as-binding-identifier.js new file mode 100644 index 0000000000..1d8527dcfd --- /dev/null +++ b/test/language/expressions/async-function/named-await-as-binding-identifier.js @@ -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; +}; diff --git a/test/language/expressions/async-function/named-await-as-identifier-reference-escaped.js b/test/language/expressions/async-function/named-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..85b01c453c --- /dev/null +++ b/test/language/expressions/async-function/named-await-as-identifier-reference-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-function/named-await-as-identifier-reference.js b/test/language/expressions/async-function/named-await-as-identifier-reference.js new file mode 100644 index 0000000000..55d8dc8dd5 --- /dev/null +++ b/test/language/expressions/async-function/named-await-as-identifier-reference.js @@ -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; +}; diff --git a/test/language/expressions/async-function/named-await-as-label-identifier-escaped.js b/test/language/expressions/async-function/named-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..c0d7cec452 --- /dev/null +++ b/test/language/expressions/async-function/named-await-as-label-identifier-escaped.js @@ -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: ; +}; diff --git a/test/language/expressions/async-function/named-await-as-label-identifier.js b/test/language/expressions/async-function/named-await-as-label-identifier.js new file mode 100644 index 0000000000..c4ec450524 --- /dev/null +++ b/test/language/expressions/async-function/named-await-as-label-identifier.js @@ -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: ; +}; diff --git a/test/language/expressions/async-generator/await-as-binding-identifier-escaped.js b/test/language/expressions/async-generator/await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..4e10e5b31b --- /dev/null +++ b/test/language/expressions/async-generator/await-as-binding-identifier-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/await-as-binding-identifier.js b/test/language/expressions/async-generator/await-as-binding-identifier.js new file mode 100644 index 0000000000..641e1e6cb9 --- /dev/null +++ b/test/language/expressions/async-generator/await-as-binding-identifier.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/await-as-identifier-reference-escaped.js b/test/language/expressions/async-generator/await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..3ff1e34d5e --- /dev/null +++ b/test/language/expressions/async-generator/await-as-identifier-reference-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/await-as-identifier-reference.js b/test/language/expressions/async-generator/await-as-identifier-reference.js new file mode 100644 index 0000000000..86a6f44d0d --- /dev/null +++ b/test/language/expressions/async-generator/await-as-identifier-reference.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/await-as-label-identifier-escaped.js b/test/language/expressions/async-generator/await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..a383525789 --- /dev/null +++ b/test/language/expressions/async-generator/await-as-label-identifier-escaped.js @@ -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: ; +}; diff --git a/test/language/expressions/async-generator/await-as-label-identifier.js b/test/language/expressions/async-generator/await-as-label-identifier.js new file mode 100644 index 0000000000..35b6704ca7 --- /dev/null +++ b/test/language/expressions/async-generator/await-as-label-identifier.js @@ -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: ; +}; diff --git a/test/language/expressions/async-generator/escaped-async.js b/test/language/expressions/async-generator/escaped-async.js new file mode 100644 index 0000000000..36c8f62528 --- /dev/null +++ b/test/language/expressions/async-generator/escaped-async.js @@ -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(){}; diff --git a/test/language/expressions/async-generator/named-await-as-binding-identifier-escaped.js b/test/language/expressions/async-generator/named-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..36927271db --- /dev/null +++ b/test/language/expressions/async-generator/named-await-as-binding-identifier-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-await-as-binding-identifier.js b/test/language/expressions/async-generator/named-await-as-binding-identifier.js new file mode 100644 index 0000000000..1dce482ed9 --- /dev/null +++ b/test/language/expressions/async-generator/named-await-as-binding-identifier.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-await-as-identifier-reference-escaped.js b/test/language/expressions/async-generator/named-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..c7eb1cd99f --- /dev/null +++ b/test/language/expressions/async-generator/named-await-as-identifier-reference-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-await-as-identifier-reference.js b/test/language/expressions/async-generator/named-await-as-identifier-reference.js new file mode 100644 index 0000000000..1e2d74c01d --- /dev/null +++ b/test/language/expressions/async-generator/named-await-as-identifier-reference.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-await-as-label-identifier-escaped.js b/test/language/expressions/async-generator/named-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..63341cd62a --- /dev/null +++ b/test/language/expressions/async-generator/named-await-as-label-identifier-escaped.js @@ -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: ; +}; diff --git a/test/language/expressions/async-generator/named-await-as-label-identifier.js b/test/language/expressions/async-generator/named-await-as-label-identifier.js new file mode 100644 index 0000000000..1fd1eaac08 --- /dev/null +++ b/test/language/expressions/async-generator/named-await-as-label-identifier.js @@ -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: ; +}; diff --git a/test/language/expressions/async-generator/named-yield-as-binding-identifier-escaped.js b/test/language/expressions/async-generator/named-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..fb8a38b983 --- /dev/null +++ b/test/language/expressions/async-generator/named-yield-as-binding-identifier-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-yield-as-binding-identifier.js b/test/language/expressions/async-generator/named-yield-as-binding-identifier.js new file mode 100644 index 0000000000..1509fd83df --- /dev/null +++ b/test/language/expressions/async-generator/named-yield-as-binding-identifier.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-yield-as-identifier-reference-escaped.js b/test/language/expressions/async-generator/named-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..baeb05788c --- /dev/null +++ b/test/language/expressions/async-generator/named-yield-as-identifier-reference-escaped.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-yield-as-identifier-reference.js b/test/language/expressions/async-generator/named-yield-as-identifier-reference.js new file mode 100644 index 0000000000..d8e9baa04d --- /dev/null +++ b/test/language/expressions/async-generator/named-yield-as-identifier-reference.js @@ -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; +}; diff --git a/test/language/expressions/async-generator/named-yield-as-label-identifier-escaped.js b/test/language/expressions/async-generator/named-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..e06acfc9c4 --- /dev/null +++ b/test/language/expressions/async-generator/named-yield-as-label-identifier-escaped.js @@ -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: ; +}; diff --git a/test/language/expressions/async-generator/named-yield-as-label-identifier.js b/test/language/expressions/async-generator/named-yield-as-label-identifier.js new file mode 100644 index 0000000000..6341cbc1b2 --- /dev/null +++ b/test/language/expressions/async-generator/named-yield-as-label-identifier.js @@ -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: ; +}; diff --git a/test/language/expressions/async-generator/yield-as-binding-identifier-escaped.js b/test/language/expressions/async-generator/yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..429fbbf127 --- /dev/null +++ b/test/language/expressions/async-generator/yield-as-binding-identifier-escaped.js @@ -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.template +/*--- +description: yield 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 [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var gen = async function *() { + var yi\u0065ld; +}; diff --git a/test/language/expressions/async-generator/yield-as-binding-identifier.js b/test/language/expressions/async-generator/yield-as-binding-identifier.js new file mode 100644 index 0000000000..b52f74faf1 --- /dev/null +++ b/test/language/expressions/async-generator/yield-as-binding-identifier.js @@ -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.template +/*--- +description: yield 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 [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var gen = async function *() { + var yield; +}; diff --git a/test/language/expressions/async-generator/yield-as-identifier-reference-escaped.js b/test/language/expressions/async-generator/yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..f8c1d78238 --- /dev/null +++ b/test/language/expressions/async-generator/yield-as-identifier-reference-escaped.js @@ -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.template +/*--- +description: yield 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 [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var gen = async function *() { + void yi\u0065ld; +}; diff --git a/test/language/expressions/async-generator/yield-as-identifier-reference.js b/test/language/expressions/async-generator/yield-as-identifier-reference.js new file mode 100644 index 0000000000..dd9b10d3dc --- /dev/null +++ b/test/language/expressions/async-generator/yield-as-identifier-reference.js @@ -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.template +/*--- +description: yield 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 [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var gen = async function *() { + void yield; +}; diff --git a/test/language/expressions/async-generator/yield-as-label-identifier-escaped.js b/test/language/expressions/async-generator/yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..a506bbc545 --- /dev/null +++ b/test/language/expressions/async-generator/yield-as-label-identifier-escaped.js @@ -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.template +/*--- +description: yield 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 [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var gen = async function *() { + yi\u0065ld: ; +}; diff --git a/test/language/expressions/async-generator/yield-as-label-identifier.js b/test/language/expressions/async-generator/yield-as-label-identifier.js new file mode 100644 index 0000000000..77f967d8a3 --- /dev/null +++ b/test/language/expressions/async-generator/yield-as-label-identifier.js @@ -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.template +/*--- +description: yield 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 [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var gen = async function *() { + yield: ; +}; diff --git a/test/language/expressions/class/async-gen-method-await-as-binding-identifier-escaped.js b/test/language/expressions/class/async-gen-method-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..533cff236e --- /dev/null +++ b/test/language/expressions/class/async-gen-method-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async *gen() { + var \u0061wait; +}}; diff --git a/test/language/expressions/class/async-gen-method-await-as-binding-identifier.js b/test/language/expressions/class/async-gen-method-await-as-binding-identifier.js new file mode 100644 index 0000000000..f5c82819e3 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async *gen() { + var await; +}}; diff --git a/test/language/expressions/class/async-gen-method-await-as-identifier-reference-escaped.js b/test/language/expressions/class/async-gen-method-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..403c4edb14 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async *gen() { + void \u0061wait; +}}; diff --git a/test/language/expressions/class/async-gen-method-await-as-identifier-reference.js b/test/language/expressions/class/async-gen-method-await-as-identifier-reference.js new file mode 100644 index 0000000000..ae73038fea --- /dev/null +++ b/test/language/expressions/class/async-gen-method-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async *gen() { + void await; +}}; diff --git a/test/language/expressions/class/async-gen-method-await-as-label-identifier-escaped.js b/test/language/expressions/class/async-gen-method-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..cc71b9066a --- /dev/null +++ b/test/language/expressions/class/async-gen-method-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async *gen() { + \u0061wait: ; +}}; diff --git a/test/language/expressions/class/async-gen-method-await-as-label-identifier.js b/test/language/expressions/class/async-gen-method-await-as-label-identifier.js new file mode 100644 index 0000000000..422ea90be6 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async *gen() { + await: ; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-await-as-binding-identifier-escaped.js b/test/language/expressions/class/async-gen-method-static-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..01c1b247c8 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async *gen() { + var \u0061wait; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-await-as-binding-identifier.js b/test/language/expressions/class/async-gen-method-static-await-as-binding-identifier.js new file mode 100644 index 0000000000..cee89e521e --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async *gen() { + var await; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-await-as-identifier-reference-escaped.js b/test/language/expressions/class/async-gen-method-static-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..32459fa6e4 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async *gen() { + void \u0061wait; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-await-as-identifier-reference.js b/test/language/expressions/class/async-gen-method-static-await-as-identifier-reference.js new file mode 100644 index 0000000000..e6a1059f85 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async *gen() { + void await; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-await-as-label-identifier-escaped.js b/test/language/expressions/class/async-gen-method-static-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..ee2912150b --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async *gen() { + \u0061wait: ; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-await-as-label-identifier.js b/test/language/expressions/class/async-gen-method-static-await-as-label-identifier.js new file mode 100644 index 0000000000..b0e4b6cf91 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async *gen() { + await: ; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-yield-as-binding-identifier-escaped.js b/test/language/expressions/class/async-gen-method-static-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..af6cc2cb06 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-yield-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { static async *gen() { + var yi\u0065ld; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-yield-as-binding-identifier.js b/test/language/expressions/class/async-gen-method-static-yield-as-binding-identifier.js new file mode 100644 index 0000000000..40355726ee --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-yield-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { static async *gen() { + var yield; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-yield-as-identifier-reference-escaped.js b/test/language/expressions/class/async-gen-method-static-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..66f23d3ee3 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-yield-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { static async *gen() { + void yi\u0065ld; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-yield-as-identifier-reference.js b/test/language/expressions/class/async-gen-method-static-yield-as-identifier-reference.js new file mode 100644 index 0000000000..44b9cfb1ad --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-yield-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { static async *gen() { + void yield; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-yield-as-label-identifier-escaped.js b/test/language/expressions/class/async-gen-method-static-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..780b758e84 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-yield-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { static async *gen() { + yi\u0065ld: ; +}}; diff --git a/test/language/expressions/class/async-gen-method-static-yield-as-label-identifier.js b/test/language/expressions/class/async-gen-method-static-yield-as-label-identifier.js new file mode 100644 index 0000000000..523e9c009a --- /dev/null +++ b/test/language/expressions/class/async-gen-method-static-yield-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier.case +// - src/async-generators/syntax/async-class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { static async *gen() { + yield: ; +}}; diff --git a/test/language/expressions/class/async-gen-method-yield-as-binding-identifier-escaped.js b/test/language/expressions/class/async-gen-method-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..95308e64e4 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-yield-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { async *gen() { + var yi\u0065ld; +}}; diff --git a/test/language/expressions/class/async-gen-method-yield-as-binding-identifier.js b/test/language/expressions/class/async-gen-method-yield-as-binding-identifier.js new file mode 100644 index 0000000000..e0be6d3c5f --- /dev/null +++ b/test/language/expressions/class/async-gen-method-yield-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { async *gen() { + var yield; +}}; diff --git a/test/language/expressions/class/async-gen-method-yield-as-identifier-reference-escaped.js b/test/language/expressions/class/async-gen-method-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..f8abfb9cc0 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-yield-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { async *gen() { + void yi\u0065ld; +}}; diff --git a/test/language/expressions/class/async-gen-method-yield-as-identifier-reference.js b/test/language/expressions/class/async-gen-method-yield-as-identifier-reference.js new file mode 100644 index 0000000000..1d51b563f5 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-yield-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { async *gen() { + void yield; +}}; diff --git a/test/language/expressions/class/async-gen-method-yield-as-label-identifier-escaped.js b/test/language/expressions/class/async-gen-method-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..24ccfb5109 --- /dev/null +++ b/test/language/expressions/class/async-gen-method-yield-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { async *gen() { + yi\u0065ld: ; +}}; diff --git a/test/language/expressions/class/async-gen-method-yield-as-label-identifier.js b/test/language/expressions/class/async-gen-method-yield-as-label-identifier.js new file mode 100644 index 0000000000..12c3dbac4a --- /dev/null +++ b/test/language/expressions/class/async-gen-method-yield-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier.case +// - src/async-generators/syntax/async-class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method as a ClassExpression element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +var C = class { async *gen() { + yield: ; +}}; diff --git a/test/language/expressions/class/async-method-await-as-binding-identifier-escaped.js b/test/language/expressions/class/async-method-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..1cd9a0ddef --- /dev/null +++ b/test/language/expressions/class/async-method-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier-escaped.case +// - src/async-functions/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async method() { + var \u0061wait; +}}; diff --git a/test/language/expressions/class/async-method-await-as-binding-identifier.js b/test/language/expressions/class/async-method-await-as-binding-identifier.js new file mode 100644 index 0000000000..b2a031ff7c --- /dev/null +++ b/test/language/expressions/class/async-method-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier.case +// - src/async-functions/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async method() { + var await; +}}; diff --git a/test/language/expressions/class/async-method-await-as-identifier-reference-escaped.js b/test/language/expressions/class/async-method-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..27f856ee00 --- /dev/null +++ b/test/language/expressions/class/async-method-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference-escaped.case +// - src/async-functions/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async method() { + void \u0061wait; +}}; diff --git a/test/language/expressions/class/async-method-await-as-identifier-reference.js b/test/language/expressions/class/async-method-await-as-identifier-reference.js new file mode 100644 index 0000000000..d827b028a3 --- /dev/null +++ b/test/language/expressions/class/async-method-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference.case +// - src/async-functions/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async method() { + void await; +}}; diff --git a/test/language/expressions/class/async-method-await-as-label-identifier-escaped.js b/test/language/expressions/class/async-method-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..d9f3aedfca --- /dev/null +++ b/test/language/expressions/class/async-method-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier-escaped.case +// - src/async-functions/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async method() { + \u0061wait: ; +}}; diff --git a/test/language/expressions/class/async-method-await-as-label-identifier.js b/test/language/expressions/class/async-method-await-as-label-identifier.js new file mode 100644 index 0000000000..63f534fc3b --- /dev/null +++ b/test/language/expressions/class/async-method-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier.case +// - src/async-functions/syntax/async-class-expr-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { async method() { + await: ; +}}; diff --git a/test/language/expressions/class/async-method-static-await-as-binding-identifier-escaped.js b/test/language/expressions/class/async-method-static-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..b7ae297fa5 --- /dev/null +++ b/test/language/expressions/class/async-method-static-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier-escaped.case +// - src/async-functions/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async method() { + var \u0061wait; +}}; diff --git a/test/language/expressions/class/async-method-static-await-as-binding-identifier.js b/test/language/expressions/class/async-method-static-await-as-binding-identifier.js new file mode 100644 index 0000000000..6439c50e76 --- /dev/null +++ b/test/language/expressions/class/async-method-static-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier.case +// - src/async-functions/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async method() { + var await; +}}; diff --git a/test/language/expressions/class/async-method-static-await-as-identifier-reference-escaped.js b/test/language/expressions/class/async-method-static-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..43254c8400 --- /dev/null +++ b/test/language/expressions/class/async-method-static-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference-escaped.case +// - src/async-functions/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async method() { + void \u0061wait; +}}; diff --git a/test/language/expressions/class/async-method-static-await-as-identifier-reference.js b/test/language/expressions/class/async-method-static-await-as-identifier-reference.js new file mode 100644 index 0000000000..881dd6a2de --- /dev/null +++ b/test/language/expressions/class/async-method-static-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference.case +// - src/async-functions/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async method() { + void await; +}}; diff --git a/test/language/expressions/class/async-method-static-await-as-label-identifier-escaped.js b/test/language/expressions/class/async-method-static-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..e21517c0ce --- /dev/null +++ b/test/language/expressions/class/async-method-static-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier-escaped.case +// - src/async-functions/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async method() { + \u0061wait: ; +}}; diff --git a/test/language/expressions/class/async-method-static-await-as-label-identifier.js b/test/language/expressions/class/async-method-static-await-as-label-identifier.js new file mode 100644 index 0000000000..a7da3a57f1 --- /dev/null +++ b/test/language/expressions/class/async-method-static-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier.case +// - src/async-functions/syntax/async-class-expr-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async method as a ClassExpression element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var C = class { static async method() { + await: ; +}}; diff --git a/test/language/expressions/class/gen-method-static-yield-as-binding-identifier-escaped.js b/test/language/expressions/class/gen-method-static-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..b2159a21fc --- /dev/null +++ b/test/language/expressions/class/gen-method-static-yield-as-binding-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class { static *gen() { + var yi\u0065ld; +}}; diff --git a/test/language/expressions/class/gen-method-static-yield-as-binding-identifier.js b/test/language/expressions/class/gen-method-static-yield-as-binding-identifier.js new file mode 100644 index 0000000000..25e13019c4 --- /dev/null +++ b/test/language/expressions/class/gen-method-static-yield-as-binding-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class { static *gen() { + var yield; +}}; diff --git a/test/language/expressions/class/gen-method-static-yield-as-identifier-reference-escaped.js b/test/language/expressions/class/gen-method-static-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..27a86ab9c8 --- /dev/null +++ b/test/language/expressions/class/gen-method-static-yield-as-identifier-reference-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class { static *gen() { + void yi\u0065ld; +}}; diff --git a/test/language/expressions/class/gen-method-static-yield-as-identifier-reference.js b/test/language/expressions/class/gen-method-static-yield-as-identifier-reference.js new file mode 100644 index 0000000000..a1ff71520d --- /dev/null +++ b/test/language/expressions/class/gen-method-static-yield-as-identifier-reference.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class { static *gen() { + void yield; +}}; diff --git a/test/language/expressions/class/gen-method-static-yield-as-label-identifier-escaped.js b/test/language/expressions/class/gen-method-static-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..897df7f2c1 --- /dev/null +++ b/test/language/expressions/class/gen-method-static-yield-as-label-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class { static *gen() { + yi\u0065ld: ; +}}; diff --git a/test/language/expressions/class/gen-method-static-yield-as-label-identifier.js b/test/language/expressions/class/gen-method-static-yield-as-label-identifier.js new file mode 100644 index 0000000000..76c74990b7 --- /dev/null +++ b/test/language/expressions/class/gen-method-static-yield-as-label-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/class-expr-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class { static *gen() { + yield: ; +}}; diff --git a/test/language/expressions/class/gen-method-yield-as-binding-identifier-escaped.js b/test/language/expressions/class/gen-method-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..e7ad8dcb55 --- /dev/null +++ b/test/language/expressions/class/gen-method-yield-as-binding-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class {*gen() { + var yi\u0065ld; +}}; diff --git a/test/language/expressions/class/gen-method-yield-as-binding-identifier.js b/test/language/expressions/class/gen-method-yield-as-binding-identifier.js new file mode 100644 index 0000000000..11d0448040 --- /dev/null +++ b/test/language/expressions/class/gen-method-yield-as-binding-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class {*gen() { + var yield; +}}; diff --git a/test/language/expressions/class/gen-method-yield-as-identifier-reference-escaped.js b/test/language/expressions/class/gen-method-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..88c404921a --- /dev/null +++ b/test/language/expressions/class/gen-method-yield-as-identifier-reference-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class {*gen() { + void yi\u0065ld; +}}; diff --git a/test/language/expressions/class/gen-method-yield-as-identifier-reference.js b/test/language/expressions/class/gen-method-yield-as-identifier-reference.js new file mode 100644 index 0000000000..76b87bc3ee --- /dev/null +++ b/test/language/expressions/class/gen-method-yield-as-identifier-reference.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class {*gen() { + void yield; +}}; diff --git a/test/language/expressions/class/gen-method-yield-as-label-identifier-escaped.js b/test/language/expressions/class/gen-method-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..a002c49aa3 --- /dev/null +++ b/test/language/expressions/class/gen-method-yield-as-label-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class {*gen() { + yi\u0065ld: ; +}}; diff --git a/test/language/expressions/class/gen-method-yield-as-label-identifier.js b/test/language/expressions/class/gen-method-yield-as-label-identifier.js new file mode 100644 index 0000000000..151f46e248 --- /dev/null +++ b/test/language/expressions/class/gen-method-yield-as-label-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/class-expr-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method as a ClassExpression element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var C = class {*gen() { + yield: ; +}}; diff --git a/test/language/expressions/generators/named-yield-as-binding-identifier-escaped.js b/test/language/expressions/generators/named-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..5cd0fceecd --- /dev/null +++ b/test/language/expressions/generators/named-yield-as-binding-identifier-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/expression-named.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *g() { + var yi\u0065ld; +}; diff --git a/test/language/expressions/generators/named-yield-as-binding-identifier.js b/test/language/expressions/generators/named-yield-as-binding-identifier.js new file mode 100644 index 0000000000..0471c77e71 --- /dev/null +++ b/test/language/expressions/generators/named-yield-as-binding-identifier.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/expression-named.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *g() { + var yield; +}; diff --git a/test/language/expressions/generators/named-yield-as-identifier-reference-escaped.js b/test/language/expressions/generators/named-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..c86041dca5 --- /dev/null +++ b/test/language/expressions/generators/named-yield-as-identifier-reference-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/expression-named.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *g() { + void yi\u0065ld; +}; diff --git a/test/language/expressions/generators/named-yield-as-identifier-reference.js b/test/language/expressions/generators/named-yield-as-identifier-reference.js new file mode 100644 index 0000000000..8f0c4dad84 --- /dev/null +++ b/test/language/expressions/generators/named-yield-as-identifier-reference.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/expression-named.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *g() { + void yield; +}; diff --git a/test/language/expressions/generators/named-yield-as-label-identifier-escaped.js b/test/language/expressions/generators/named-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..d581027974 --- /dev/null +++ b/test/language/expressions/generators/named-yield-as-label-identifier-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/expression-named.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *g() { + yi\u0065ld: ; +}; diff --git a/test/language/expressions/generators/named-yield-as-label-identifier.js b/test/language/expressions/generators/named-yield-as-label-identifier.js new file mode 100644 index 0000000000..4fc4e07445 --- /dev/null +++ b/test/language/expressions/generators/named-yield-as-label-identifier.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/expression-named.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *g() { + yield: ; +}; diff --git a/test/language/expressions/generators/yield-as-binding-identifier-escaped.js b/test/language/expressions/generators/yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..dfacdf5b5b --- /dev/null +++ b/test/language/expressions/generators/yield-as-binding-identifier-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/expression.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *() { + var yi\u0065ld; +}; diff --git a/test/language/expressions/generators/yield-as-binding-identifier.js b/test/language/expressions/generators/yield-as-binding-identifier.js index d90c5945ef..a26aa2140c 100644 --- a/test/language/expressions/generators/yield-as-binding-identifier.js +++ b/test/language/expressions/generators/yield-as-binding-identifier.js @@ -1,16 +1,26 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/expression.template /*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a binding identifier. - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions -var g = function*() { - yield = 1; + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *() { + var yield; }; diff --git a/test/language/expressions/generators/yield-as-identifier-reference-escaped.js b/test/language/expressions/generators/yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..390d154f3c --- /dev/null +++ b/test/language/expressions/generators/yield-as-identifier-reference-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/expression.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *() { + void yi\u0065ld; +}; diff --git a/test/language/expressions/generators/yield-as-identifier-reference.js b/test/language/expressions/generators/yield-as-identifier-reference.js new file mode 100644 index 0000000000..1321239780 --- /dev/null +++ b/test/language/expressions/generators/yield-as-identifier-reference.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/expression.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *() { + void yield; +}; diff --git a/test/language/expressions/generators/yield-as-label-identifier-escaped.js b/test/language/expressions/generators/yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..e7dcd910f7 --- /dev/null +++ b/test/language/expressions/generators/yield-as-label-identifier-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/expression.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *() { + yi\u0065ld: ; +}; diff --git a/test/language/expressions/generators/yield-as-label-identifier.js b/test/language/expressions/generators/yield-as-label-identifier.js new file mode 100644 index 0000000000..e6be45af71 --- /dev/null +++ b/test/language/expressions/generators/yield-as-label-identifier.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/expression.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed generator expression) +esid: prod-GeneratorExpression +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorExpression: + function * BindingIdentifier opt ( FormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var gen = function *() { + yield: ; +}; diff --git a/test/language/expressions/generators/yield-as-label.js b/test/language/expressions/generators/yield-as-label.js deleted file mode 100644 index 2d95446bf4..0000000000 --- a/test/language/expressions/generators/yield-as-label.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a label. - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ - -var g = function*() { - yield: 1; -}; diff --git a/test/language/expressions/new.target/escaped-new.js b/test/language/expressions/new.target/escaped-new.js new file mode 100644 index 0000000000..72e34e19d5 --- /dev/null +++ b/test/language/expressions/new.target/escaped-new.js @@ -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 `new` 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 +---*/ + +function f() { + n\u0065w.target; +} diff --git a/test/language/expressions/new.target/escaped-target.js b/test/language/expressions/new.target/escaped-target.js new file mode 100644 index 0000000000..6407524173 --- /dev/null +++ b/test/language/expressions/new.target/escaped-target.js @@ -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 `target` 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 +---*/ + +function f() { + new.t\u0061rget; +} diff --git a/test/language/expressions/object/method-definition/async-await-as-binding-identifier-escaped.js b/test/language/expressions/object/method-definition/async-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..fe4640bafe --- /dev/null +++ b/test/language/expressions/object/method-definition/async-await-as-binding-identifier-escaped.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier-escaped.case +// - src/async-functions/syntax/async-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var obj = { + async method() { + var \u0061wait; + } +}; diff --git a/test/language/expressions/object/method-definition/async-await-as-binding-identifier.js b/test/language/expressions/object/method-definition/async-await-as-binding-identifier.js new file mode 100644 index 0000000000..ab9e0d4ccf --- /dev/null +++ b/test/language/expressions/object/method-definition/async-await-as-binding-identifier.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier.case +// - src/async-functions/syntax/async-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var obj = { + async method() { + var await; + } +}; diff --git a/test/language/expressions/object/method-definition/async-await-as-identifier-reference-escaped.js b/test/language/expressions/object/method-definition/async-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..ba6b8b9d13 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-await-as-identifier-reference-escaped.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference-escaped.case +// - src/async-functions/syntax/async-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var obj = { + async method() { + void \u0061wait; + } +}; diff --git a/test/language/expressions/object/method-definition/async-await-as-identifier-reference.js b/test/language/expressions/object/method-definition/async-await-as-identifier-reference.js new file mode 100644 index 0000000000..0901a2873e --- /dev/null +++ b/test/language/expressions/object/method-definition/async-await-as-identifier-reference.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference.case +// - src/async-functions/syntax/async-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var obj = { + async method() { + void await; + } +}; diff --git a/test/language/expressions/object/method-definition/async-await-as-label-identifier-escaped.js b/test/language/expressions/object/method-definition/async-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..77ccdfc4ea --- /dev/null +++ b/test/language/expressions/object/method-definition/async-await-as-label-identifier-escaped.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier-escaped.case +// - src/async-functions/syntax/async-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var obj = { + async method() { + \u0061wait: ; + } +}; diff --git a/test/language/expressions/object/method-definition/async-await-as-label-identifier.js b/test/language/expressions/object/method-definition/async-await-as-label-identifier.js new file mode 100644 index 0000000000..b9fc331b72 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-await-as-label-identifier.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier.case +// - src/async-functions/syntax/async-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +var obj = { + async method() { + await: ; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-await-as-binding-identifier-escaped.js b/test/language/expressions/object/method-definition/async-gen-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..b4822e8e15 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-await-as-binding-identifier-escaped.js @@ -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-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + +var obj = { + async *method() { + var \u0061wait; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-await-as-binding-identifier.js b/test/language/expressions/object/method-definition/async-gen-await-as-binding-identifier.js new file mode 100644 index 0000000000..16f01ca777 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-await-as-binding-identifier.js @@ -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-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + +var obj = { + async *method() { + var await; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-await-as-identifier-reference-escaped.js b/test/language/expressions/object/method-definition/async-gen-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..5fe5df5a7f --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-await-as-identifier-reference-escaped.js @@ -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-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + +var obj = { + async *method() { + void \u0061wait; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-await-as-identifier-reference.js b/test/language/expressions/object/method-definition/async-gen-await-as-identifier-reference.js new file mode 100644 index 0000000000..ad66a857de --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-await-as-identifier-reference.js @@ -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-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + +var obj = { + async *method() { + void await; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-await-as-label-identifier-escaped.js b/test/language/expressions/object/method-definition/async-gen-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..e0aac01dc1 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-await-as-label-identifier-escaped.js @@ -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-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + +var obj = { + async *method() { + \u0061wait: ; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-await-as-label-identifier.js b/test/language/expressions/object/method-definition/async-gen-await-as-label-identifier.js new file mode 100644 index 0000000000..36cabc6756 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-await-as-label-identifier.js @@ -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-obj-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + +var obj = { + async *method() { + await: ; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-meth-escaped-async.js b/test/language/expressions/object/method-definition/async-gen-meth-escaped-async.js new file mode 100644 index 0000000000..7632347181 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-meth-escaped-async.js @@ -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. + +/*--- +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] +---*/ + +({ + \u0061sync* m(){} +}); diff --git a/test/language/expressions/object/method-definition/async-gen-yield-as-binding-identifier-escaped.js b/test/language/expressions/object/method-definition/async-gen-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..06a42dd08c --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-yield-as-binding-identifier-escaped.js @@ -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-obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + async *method() { + var yi\u0065ld; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-yield-as-binding-identifier.js b/test/language/expressions/object/method-definition/async-gen-yield-as-binding-identifier.js new file mode 100644 index 0000000000..efc8a4302f --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-yield-as-binding-identifier.js @@ -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-obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + async *method() { + var yield; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-yield-as-identifier-reference-escaped.js b/test/language/expressions/object/method-definition/async-gen-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..18bf881478 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-yield-as-identifier-reference-escaped.js @@ -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-obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + async *method() { + void yi\u0065ld; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-yield-as-identifier-reference.js b/test/language/expressions/object/method-definition/async-gen-yield-as-identifier-reference.js new file mode 100644 index 0000000000..0bc824773f --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-yield-as-identifier-reference.js @@ -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-obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + async *method() { + void yield; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-yield-as-label-identifier-escaped.js b/test/language/expressions/object/method-definition/async-gen-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..c09ae334d1 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-yield-as-label-identifier-escaped.js @@ -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-obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + async *method() { + yi\u0065ld: ; + } +}; diff --git a/test/language/expressions/object/method-definition/async-gen-yield-as-label-identifier.js b/test/language/expressions/object/method-definition/async-gen-yield-as-label-identifier.js new file mode 100644 index 0000000000..e77071f810 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-gen-yield-as-label-identifier.js @@ -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-obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + async *method() { + yield: ; + } +}; diff --git a/test/language/expressions/object/method-definition/async-meth-escaped-async.js b/test/language/expressions/object/method-definition/async-meth-escaped-async.js new file mode 100644 index 0000000000..1a5a575ea7 --- /dev/null +++ b/test/language/expressions/object/method-definition/async-meth-escaped-async.js @@ -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. + +/*--- +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 m(){} +}); diff --git a/test/language/expressions/object/method-definition/escaped-get.js b/test/language/expressions/object/method-definition/escaped-get.js new file mode 100644 index 0000000000..fc38ae0c32 --- /dev/null +++ b/test/language/expressions/object/method-definition/escaped-get.js @@ -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 `get` 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 +---*/ + +({ + g\u0065t m() {} +}); diff --git a/test/language/expressions/object/method-definition/escaped-set.js b/test/language/expressions/object/method-definition/escaped-set.js new file mode 100644 index 0000000000..e4edb4fbf2 --- /dev/null +++ b/test/language/expressions/object/method-definition/escaped-set.js @@ -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 `set` 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 +---*/ + +({ + s\u0065t m(v) {} +}); diff --git a/test/language/expressions/object/method-definition/gen-yield-as-binding-identifier-escaped.js b/test/language/expressions/object/method-definition/gen-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..35498bb196 --- /dev/null +++ b/test/language/expressions/object/method-definition/gen-yield-as-binding-identifier-escaped.js @@ -0,0 +1,28 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorMethod[Yield, Await]: + * PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + *method() { + var yi\u0065ld; + } +}; diff --git a/test/language/expressions/object/method-definition/gen-yield-as-binding-identifier.js b/test/language/expressions/object/method-definition/gen-yield-as-binding-identifier.js new file mode 100644 index 0000000000..61bd78bb5a --- /dev/null +++ b/test/language/expressions/object/method-definition/gen-yield-as-binding-identifier.js @@ -0,0 +1,28 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorMethod[Yield, Await]: + * PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + *method() { + var yield; + } +}; diff --git a/test/language/expressions/object/method-definition/gen-yield-as-identifier-reference-escaped.js b/test/language/expressions/object/method-definition/gen-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..bb33828426 --- /dev/null +++ b/test/language/expressions/object/method-definition/gen-yield-as-identifier-reference-escaped.js @@ -0,0 +1,28 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorMethod[Yield, Await]: + * PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + *method() { + void yi\u0065ld; + } +}; diff --git a/test/language/expressions/object/method-definition/gen-yield-as-identifier-reference.js b/test/language/expressions/object/method-definition/gen-yield-as-identifier-reference.js new file mode 100644 index 0000000000..dc7d32d8d0 --- /dev/null +++ b/test/language/expressions/object/method-definition/gen-yield-as-identifier-reference.js @@ -0,0 +1,28 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorMethod[Yield, Await]: + * PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + *method() { + void yield; + } +}; diff --git a/test/language/expressions/object/method-definition/gen-yield-as-label-identifier-escaped.js b/test/language/expressions/object/method-definition/gen-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..0da5a53f7e --- /dev/null +++ b/test/language/expressions/object/method-definition/gen-yield-as-label-identifier-escaped.js @@ -0,0 +1,28 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorMethod[Yield, Await]: + * PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + *method() { + yi\u0065ld: ; + } +}; diff --git a/test/language/expressions/object/method-definition/gen-yield-as-label-identifier.js b/test/language/expressions/object/method-definition/gen-yield-as-label-identifier.js new file mode 100644 index 0000000000..bb319e8d94 --- /dev/null +++ b/test/language/expressions/object/method-definition/gen-yield-as-label-identifier.js @@ -0,0 +1,28 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/obj-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorMethod[Yield, Await]: + * PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +var obj = { + *method() { + yield: ; + } +}; diff --git a/test/language/expressions/object/method-definition/yield-as-binding-identifier.js b/test/language/expressions/object/method-definition/yield-as-binding-identifier.js deleted file mode 100644 index 20310e2e59..0000000000 --- a/test/language/expressions/object/method-definition/yield-as-binding-identifier.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a binding identifier. - features: [generators] - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ - -var obj = { - *g() { - yield = 1; - } -}; diff --git a/test/language/expressions/object/method-definition/yield-as-label.js b/test/language/expressions/object/method-definition/yield-as-label.js deleted file mode 100644 index 6a9f15f16f..0000000000 --- a/test/language/expressions/object/method-definition/yield-as-label.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a label. - features: [generators] - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ - -var obj = { - *g() { - yield: 1; - } -}; diff --git a/test/language/expressions/addition/S9.3_A1_T2.js b/test/language/expressions/unary-plus/S9.3_A1_T2.js similarity index 100% rename from test/language/expressions/addition/S9.3_A1_T2.js rename to test/language/expressions/unary-plus/S9.3_A1_T2.js diff --git a/test/language/expressions/addition/S9.3_A2_T2.js b/test/language/expressions/unary-plus/S9.3_A2_T2.js similarity index 100% rename from test/language/expressions/addition/S9.3_A2_T2.js rename to test/language/expressions/unary-plus/S9.3_A2_T2.js diff --git a/test/language/expressions/addition/S9.3_A3_T2.js b/test/language/expressions/unary-plus/S9.3_A3_T2.js similarity index 100% rename from test/language/expressions/addition/S9.3_A3_T2.js rename to test/language/expressions/unary-plus/S9.3_A3_T2.js diff --git a/test/language/expressions/addition/S9.3_A4.1_T2.js b/test/language/expressions/unary-plus/S9.3_A4.1_T2.js similarity index 100% rename from test/language/expressions/addition/S9.3_A4.1_T2.js rename to test/language/expressions/unary-plus/S9.3_A4.1_T2.js diff --git a/test/language/expressions/addition/S9.3_A4.2_T2.js b/test/language/expressions/unary-plus/S9.3_A4.2_T2.js similarity index 100% rename from test/language/expressions/addition/S9.3_A4.2_T2.js rename to test/language/expressions/unary-plus/S9.3_A4.2_T2.js diff --git a/test/language/expressions/addition/S9.3_A5_T2.js b/test/language/expressions/unary-plus/S9.3_A5_T2.js similarity index 100% rename from test/language/expressions/addition/S9.3_A5_T2.js rename to test/language/expressions/unary-plus/S9.3_A5_T2.js diff --git a/test/language/future-reserved-words/7.6.1-17-s.js b/test/language/future-reserved-words/7.6.1-17-s.js deleted file mode 100644 index 114a6beca9..0000000000 --- a/test/language/future-reserved-words/7.6.1-17-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-17-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: implements (implements) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var \u0069mplements = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-18-s.js b/test/language/future-reserved-words/7.6.1-18-s.js deleted file mode 100644 index 0512a03ad9..0000000000 --- a/test/language/future-reserved-words/7.6.1-18-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-18-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: l\u0065t (let) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var l\u0065t = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-19-s.js b/test/language/future-reserved-words/7.6.1-19-s.js deleted file mode 100644 index c3c33f5503..0000000000 --- a/test/language/future-reserved-words/7.6.1-19-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-19-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: privat\u0065 (private) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var privat\u0065 = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-20-s.js b/test/language/future-reserved-words/7.6.1-20-s.js deleted file mode 100644 index e0b1db3653..0000000000 --- a/test/language/future-reserved-words/7.6.1-20-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-20-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var \u0070\u0075\u0062\u006c\u0069\u0063 = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-21-s.js b/test/language/future-reserved-words/7.6.1-21-s.js deleted file mode 100644 index c37c35c1a0..0000000000 --- a/test/language/future-reserved-words/7.6.1-21-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-21-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: \u0079ield (yield) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var \u0079ield = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-22-s.js b/test/language/future-reserved-words/7.6.1-22-s.js deleted file mode 100644 index 0bca6b3f5d..0000000000 --- a/test/language/future-reserved-words/7.6.1-22-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-22-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: inte\u0072face (interface) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var inte\u0072face = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-23-s.js b/test/language/future-reserved-words/7.6.1-23-s.js deleted file mode 100644 index 72ecb0c481..0000000000 --- a/test/language/future-reserved-words/7.6.1-23-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-23-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: packag\u0065 (package) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var packag\u0065 = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-24-s.js b/test/language/future-reserved-words/7.6.1-24-s.js deleted file mode 100644 index d422e14b7b..0000000000 --- a/test/language/future-reserved-words/7.6.1-24-s.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-24-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: - \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1-25-s.js b/test/language/future-reserved-words/7.6.1-25-s.js deleted file mode 100644 index 47efc0d07c..0000000000 --- a/test/language/future-reserved-words/7.6.1-25-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1-25-s -description: > - 7.6 - SyntaxError expected: reserved words used as Identifier - Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static) -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var \u0073\u0074\u0061\u0074\u0069\u0063 = 123;"); -}); diff --git a/test/language/future-reserved-words/7.6.1.2-1-s.js b/test/language/future-reserved-words/7.6.1.2-1-s.js deleted file mode 100644 index 85f9b58b5d..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-1-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-1-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'implements' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var implements = 1;"); -}); diff --git a/test/language/future-reserved-words/7.6.1.2-2-s.js b/test/language/future-reserved-words/7.6.1.2-2-s.js deleted file mode 100644 index 0c2ac187ac..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-2-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-2-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord 'let' - occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var let = 1;"); -}); diff --git a/test/language/future-reserved-words/7.6.1.2-3-s.js b/test/language/future-reserved-words/7.6.1.2-3-s.js deleted file mode 100644 index 27c338641a..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-3-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-3-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'private' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var private = 1;"); -}); diff --git a/test/language/future-reserved-words/7.6.1.2-4-s.js b/test/language/future-reserved-words/7.6.1.2-4-s.js deleted file mode 100644 index b215af858c..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-4-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-4-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'public' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var public = 1;"); -}); diff --git a/test/language/future-reserved-words/7.6.1.2-5-s.js b/test/language/future-reserved-words/7.6.1.2-5-s.js deleted file mode 100644 index aa2d106b46..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-5-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-5-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'yield' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var yield = 1;") -}); diff --git a/test/language/future-reserved-words/7.6.1.2-6-s.js b/test/language/future-reserved-words/7.6.1.2-6-s.js deleted file mode 100644 index 01c84246e0..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-6-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-6-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'interface' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var interface = 1;") -}); diff --git a/test/language/future-reserved-words/7.6.1.2-7-s.js b/test/language/future-reserved-words/7.6.1.2-7-s.js deleted file mode 100644 index f074d35420..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-7-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-7-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'package' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var package = 1;"); -}); diff --git a/test/language/future-reserved-words/7.6.1.2-8-s.js b/test/language/future-reserved-words/7.6.1.2-8-s.js deleted file mode 100644 index 6e08bd214a..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-8-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-8-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'protected' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var protected = 1;"); -}); diff --git a/test/language/future-reserved-words/7.6.1.2-9-s.js b/test/language/future-reserved-words/7.6.1.2-9-s.js deleted file mode 100644 index 0354bd57d8..0000000000 --- a/test/language/future-reserved-words/7.6.1.2-9-s.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-9-s -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'static' occurs in strict mode code -flags: [onlyStrict] ----*/ - - -assert.throws(SyntaxError, function() { - eval("var static = 1;"); -}); diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.15.js b/test/language/future-reserved-words/S7.6.1.2_A1.15.js deleted file mode 100644 index 7c0fce200f..0000000000 --- a/test/language/future-reserved-words/S7.6.1.2_A1.15.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "implements" token can not be used as identifier in strict code -es5id: 7.6.1.2_A1.15 -description: Checking if execution of "implements=1" fails in strict code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var implements = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.18.js b/test/language/future-reserved-words/S7.6.1.2_A1.18.js deleted file mode 100644 index c9d8876440..0000000000 --- a/test/language/future-reserved-words/S7.6.1.2_A1.18.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "interface" token can not be used as identifier in strict code -es5id: 7.6.1.2_A1.18 -description: Checking if execution of "interface = 1" fails in strict code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var interface = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.21.js b/test/language/future-reserved-words/S7.6.1.2_A1.21.js deleted file mode 100644 index deacbfd3aa..0000000000 --- a/test/language/future-reserved-words/S7.6.1.2_A1.21.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "package" token can not be used as identifier in strict code -es5id: 7.6.1.2_A1.21 -description: Checking if execution of "package=1" fails in strict code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var package = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.22.js b/test/language/future-reserved-words/S7.6.1.2_A1.22.js deleted file mode 100644 index 0a7ed7f81e..0000000000 --- a/test/language/future-reserved-words/S7.6.1.2_A1.22.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "private" token can not be used as identifier in strict code -es5id: 7.6.1.2_A1.22 -description: Checking if execution of "private=1" fails in strict code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var private = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.23.js b/test/language/future-reserved-words/S7.6.1.2_A1.23.js deleted file mode 100644 index 092bf67e34..0000000000 --- a/test/language/future-reserved-words/S7.6.1.2_A1.23.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "protected" token can not be used as identifier in strict code -es5id: 7.6.1.2_A1.23 -description: Checking if execution of "protected=1" fails in strict code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var protected = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.24.js b/test/language/future-reserved-words/S7.6.1.2_A1.24.js deleted file mode 100644 index abd88425bc..0000000000 --- a/test/language/future-reserved-words/S7.6.1.2_A1.24.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "public" token can not be used as identifier in strict code -es5id: 7.6.1.2_A1.24 -description: Checking if execution of "public=1" fails in strict code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var public = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.26.js b/test/language/future-reserved-words/S7.6.1.2_A1.26.js deleted file mode 100644 index b765345a92..0000000000 --- a/test/language/future-reserved-words/S7.6.1.2_A1.26.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "static" token can not be used as identifier in strict code -es5id: 7.6.1.2_A1.26 -description: Checking if execution of "static=1" fails in strict code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var static = 1; diff --git a/test/language/future-reserved-words/7.6.1.2-16-s.js b/test/language/future-reserved-words/_implements.js similarity index 90% rename from test/language/future-reserved-words/7.6.1.2-16-s.js rename to test/language/future-reserved-words/_implements.js index 284fd5dca9..f8586032fe 100644 --- a/test/language/future-reserved-words/7.6.1.2-16-s.js +++ b/test/language/future-reserved-words/_implements.js @@ -7,6 +7,6 @@ description: > SyntaxError isn't thrown when '_implements' occurs ---*/ - var _implements = 1; +var _implements = 1; assert.sameValue(_implements, 1, '_implements'); diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.1.js b/test/language/future-reserved-words/abstract.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.1.js rename to test/language/future-reserved-words/abstract.js index 8e7406158a..627d06b596 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.1.js +++ b/test/language/future-reserved-words/abstract.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "abstract" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.1 description: Checking if execution of "abstract=1" succeeds +info: > + `abstract` was removed from the list of future reserved words in ECMAScript 5. ---*/ var abstract = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.2.js b/test/language/future-reserved-words/boolean.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.2.js rename to test/language/future-reserved-words/boolean.js index 14ece48fe3..715c5974ef 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.2.js +++ b/test/language/future-reserved-words/boolean.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "boolean" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.2 description: Checking if execution of "boolean=1" succeeds +info: > + `boolean` was removed from the list of future reserved words in ECMAScript 5. ---*/ var boolean = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.3.js b/test/language/future-reserved-words/byte.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.3.js rename to test/language/future-reserved-words/byte.js index 8b39c2b5a6..55f12c0750 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.3.js +++ b/test/language/future-reserved-words/byte.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "byte" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.3 description: Checking if execution of "byte=1" succeeds +info: > + `byte` was removed from the list of future reserved words in ECMAScript 5. ---*/ var byte = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.4.js b/test/language/future-reserved-words/char.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.4.js rename to test/language/future-reserved-words/char.js index 48ae03a5a6..14515dc200 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.4.js +++ b/test/language/future-reserved-words/char.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "char" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.4 description: Checking if execution of "char=1" succeeds +info: > + `char` was removed from the list of future reserved words in ECMAScript 5. ---*/ var char = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.5.js b/test/language/future-reserved-words/class.js similarity index 51% rename from test/language/future-reserved-words/S7.6.1.2_A1.5.js rename to test/language/future-reserved-words/class.js index 72ab227e80..bb1eba40d0 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.5.js +++ b/test/language/future-reserved-words/class.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "class" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.5 description: Checking if execution of "class=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.6.js b/test/language/future-reserved-words/const.js similarity index 51% rename from test/language/future-reserved-words/S7.6.1.2_A1.6.js rename to test/language/future-reserved-words/const.js index cf176bbb88..ea96279dc7 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.6.js +++ b/test/language/future-reserved-words/const.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "const" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.6 description: Checking if execution of "const=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.7.js b/test/language/future-reserved-words/debugger.js similarity index 51% rename from test/language/future-reserved-words/S7.6.1.2_A1.7.js rename to test/language/future-reserved-words/debugger.js index eae9074d56..b948ac4daf 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.7.js +++ b/test/language/future-reserved-words/debugger.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "debugger" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.7 description: Checking if execution of "debugger=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.8.js b/test/language/future-reserved-words/double.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.8.js rename to test/language/future-reserved-words/double.js index a8354b3b18..344ad382c2 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.8.js +++ b/test/language/future-reserved-words/double.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "double" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.8 description: Checking if execution of "double=1" succeeds +info: > + `double` was removed from the list of future reserved words in ECMAScript 5. ---*/ var double = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.9.js b/test/language/future-reserved-words/enum.js similarity index 50% rename from test/language/future-reserved-words/S7.6.1.2_A1.9.js rename to test/language/future-reserved-words/enum.js index 8e04cff51f..b106c296cd 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.9.js +++ b/test/language/future-reserved-words/enum.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "enum" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.9 description: Checking if execution of "enum=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.10.js b/test/language/future-reserved-words/export.js similarity index 51% rename from test/language/future-reserved-words/S7.6.1.2_A1.10.js rename to test/language/future-reserved-words/export.js index be6f1006f7..763caeed57 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.10.js +++ b/test/language/future-reserved-words/export.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "export" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.10 description: Checking if execution of "export=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.11.js b/test/language/future-reserved-words/extends.js similarity index 51% rename from test/language/future-reserved-words/S7.6.1.2_A1.11.js rename to test/language/future-reserved-words/extends.js index d9bdd2f4e3..8c1f595579 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.11.js +++ b/test/language/future-reserved-words/extends.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "extends" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.11 description: Checking if execution of "extends=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.12.js b/test/language/future-reserved-words/final.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.12.js rename to test/language/future-reserved-words/final.js index 9b97734be4..a8634f661f 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.12.js +++ b/test/language/future-reserved-words/final.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "final" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.12 description: Checking if execution of "final=1" succeeds +info: > + `final` was removed from the list of future reserved words in ECMAScript 5. ---*/ var final = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.13.js b/test/language/future-reserved-words/float.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.13.js rename to test/language/future-reserved-words/float.js index 5576838dc0..25d2e0cb4f 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.13.js +++ b/test/language/future-reserved-words/float.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "float" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.13 description: Checking if execution of "float=1" succeeds +info: > + `float` was removed from the list of future reserved words in ECMAScript 5. ---*/ var float = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.14.js b/test/language/future-reserved-words/goto.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.14.js rename to test/language/future-reserved-words/goto.js index 381b67c8c0..e81365a340 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.14.js +++ b/test/language/future-reserved-words/goto.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "goto" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.14 description: Checking if execution of "goto=1" succeeds +info: > + `goto` was removed from the list of future reserved words in ECMAScript 5. ---*/ var goto = 1; diff --git a/test/language/future-reserved-words/7.6.1.2-12-s.js b/test/language/future-reserved-words/implement.js similarity index 90% rename from test/language/future-reserved-words/7.6.1.2-12-s.js rename to test/language/future-reserved-words/implement.js index 1524b197bd..82789235ab 100644 --- a/test/language/future-reserved-words/7.6.1.2-12-s.js +++ b/test/language/future-reserved-words/implement.js @@ -7,6 +7,6 @@ description: > SyntaxError isn't thrown when 'implement' occurs ---*/ - var implement = 1; +var implement = 1; assert.sameValue(implement, 1, 'implement'); diff --git a/test/language/future-reserved-words/implements-strict-escaped.js b/test/language/future-reserved-words/implements-strict-escaped.js new file mode 100644 index 0000000000..ca6fd22e75 --- /dev/null +++ b/test/language/future-reserved-words/implements-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-17-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: implements (implements) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var \u0069mplements = 123; diff --git a/test/language/future-reserved-words/implements-strict.js b/test/language/future-reserved-words/implements-strict.js new file mode 100644 index 0000000000..3c5f67a9d7 --- /dev/null +++ b/test/language/future-reserved-words/implements-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-1-s +description: > + Strict Mode - SyntaxError is thrown when 'implements' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var implements = 1; diff --git a/test/language/future-reserved-words/7.6.1.2-11-s.js b/test/language/future-reserved-words/implements-titlecase.js similarity index 90% rename from test/language/future-reserved-words/7.6.1.2-11-s.js rename to test/language/future-reserved-words/implements-titlecase.js index 8dfcf574ea..9fe6ec04fc 100644 --- a/test/language/future-reserved-words/7.6.1.2-11-s.js +++ b/test/language/future-reserved-words/implements-titlecase.js @@ -7,6 +7,6 @@ description: > SyntaxError isn't thrown when 'Implements' occurs ---*/ - var Implements = 1; +var Implements = 1; assert.sameValue(Implements, 1, 'Implements'); diff --git a/test/language/future-reserved-words/7.6.1.2-10-s.js b/test/language/future-reserved-words/implements-uppercase.js similarity index 90% rename from test/language/future-reserved-words/7.6.1.2-10-s.js rename to test/language/future-reserved-words/implements-uppercase.js index 4d10b88908..d9484a66f7 100644 --- a/test/language/future-reserved-words/7.6.1.2-10-s.js +++ b/test/language/future-reserved-words/implements-uppercase.js @@ -7,6 +7,6 @@ description: > SyntaxError isn't thrown when 'IMPLEMENTS' occurs ---*/ - var IMPLEMENTS = 1; +var IMPLEMENTS = 1; assert.sameValue(IMPLEMENTS, 1, 'IMPLEMENTS'); diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.15ns.js b/test/language/future-reserved-words/implements.js similarity index 100% rename from test/language/future-reserved-words/S7.6.1.2_A1.15ns.js rename to test/language/future-reserved-words/implements.js diff --git a/test/language/future-reserved-words/7.6.1.2-14-s.js b/test/language/future-reserved-words/implements0.js similarity index 90% rename from test/language/future-reserved-words/7.6.1.2-14-s.js rename to test/language/future-reserved-words/implements0.js index 725aeacb6e..7f57e60946 100644 --- a/test/language/future-reserved-words/7.6.1.2-14-s.js +++ b/test/language/future-reserved-words/implements0.js @@ -7,6 +7,6 @@ description: > SyntaxError isn't thrown when 'implements0' occurs ---*/ - var implements0 = 1; +var implements0 = 1; assert.sameValue(implements0, 1, 'implements0'); diff --git a/test/language/future-reserved-words/7.6.1.2-13-s.js b/test/language/future-reserved-words/implementss.js similarity index 90% rename from test/language/future-reserved-words/7.6.1.2-13-s.js rename to test/language/future-reserved-words/implementss.js index 6663859a17..ba9933f7e7 100644 --- a/test/language/future-reserved-words/7.6.1.2-13-s.js +++ b/test/language/future-reserved-words/implementss.js @@ -7,6 +7,6 @@ description: > SyntaxError isn't thrown when 'implementss' occurs ---*/ - var implementss = 1; +var implementss = 1; assert.sameValue(implementss, 1, 'implementss'); diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.16.js b/test/language/future-reserved-words/import.js similarity index 51% rename from test/language/future-reserved-words/S7.6.1.2_A1.16.js rename to test/language/future-reserved-words/import.js index da5cd8ad53..bddea8f7e7 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.16.js +++ b/test/language/future-reserved-words/import.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "import" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.16 description: Checking if execution of "import=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.17.js b/test/language/future-reserved-words/int.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.17.js rename to test/language/future-reserved-words/int.js index 2dd1dd26c4..151896554e 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.17.js +++ b/test/language/future-reserved-words/int.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "int" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.17 description: Checking if execution of "int=1" succeeds +info: > + `int` was removed from the list of future reserved words in ECMAScript 5. ---*/ var int = 1; diff --git a/test/language/future-reserved-words/interface-strict-escaped.js b/test/language/future-reserved-words/interface-strict-escaped.js new file mode 100644 index 0000000000..bec054c0fc --- /dev/null +++ b/test/language/future-reserved-words/interface-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-22-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: inte\u0072face (interface) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var inte\u0072face = 123; diff --git a/test/language/future-reserved-words/interface-strict.js b/test/language/future-reserved-words/interface-strict.js new file mode 100644 index 0000000000..83c3dfe334 --- /dev/null +++ b/test/language/future-reserved-words/interface-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-6-s +description: > + Strict Mode - SyntaxError is thrown when 'interface' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var interface = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.18ns.js b/test/language/future-reserved-words/interface.js similarity index 100% rename from test/language/future-reserved-words/S7.6.1.2_A1.18ns.js rename to test/language/future-reserved-words/interface.js diff --git a/test/language/future-reserved-words/let-strict-escaped.js b/test/language/future-reserved-words/let-strict-escaped.js new file mode 100644 index 0000000000..c1c7946190 --- /dev/null +++ b/test/language/future-reserved-words/let-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-18-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: l\u0065t (let) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var l\u0065t = 123; diff --git a/test/language/future-reserved-words/let-strict.js b/test/language/future-reserved-words/let-strict.js new file mode 100644 index 0000000000..fe3e049e4e --- /dev/null +++ b/test/language/future-reserved-words/let-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-2-s +description: > + Strict Mode - SyntaxError is thrown when 'let' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var let = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.19.js b/test/language/future-reserved-words/long.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.19.js rename to test/language/future-reserved-words/long.js index 689c84f080..5f88caf4d0 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.19.js +++ b/test/language/future-reserved-words/long.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "long" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.19 description: Checking if execution of "long=1" succeeds +info: > + `long` was removed from the list of future reserved words in ECMAScript 5. ---*/ var long = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.20.js b/test/language/future-reserved-words/native.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.20.js rename to test/language/future-reserved-words/native.js index 174d92c06f..1ec95193b4 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.20.js +++ b/test/language/future-reserved-words/native.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "native" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.20 description: Checking if execution of "native=1" succeeds +info: > + `native` was removed from the list of future reserved words in ECMAScript 5. ---*/ var native = 1; diff --git a/test/language/future-reserved-words/package-strict-escaped.js b/test/language/future-reserved-words/package-strict-escaped.js new file mode 100644 index 0000000000..e7c691006a --- /dev/null +++ b/test/language/future-reserved-words/package-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-23-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: packag\u0065 (package) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var packag\u0065 = 123; diff --git a/test/language/future-reserved-words/package-strict.js b/test/language/future-reserved-words/package-strict.js new file mode 100644 index 0000000000..5e8c5bb4eb --- /dev/null +++ b/test/language/future-reserved-words/package-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-7-s +description: > + Strict Mode - SyntaxError is thrown when 'package' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var package = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.21ns.js b/test/language/future-reserved-words/package.js similarity index 100% rename from test/language/future-reserved-words/S7.6.1.2_A1.21ns.js rename to test/language/future-reserved-words/package.js diff --git a/test/language/future-reserved-words/private-strict-escaped.js b/test/language/future-reserved-words/private-strict-escaped.js new file mode 100644 index 0000000000..28c6cab95e --- /dev/null +++ b/test/language/future-reserved-words/private-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-19-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: privat\u0065 (private) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var privat\u0065 = 123; diff --git a/test/language/future-reserved-words/private-strict.js b/test/language/future-reserved-words/private-strict.js new file mode 100644 index 0000000000..25a952b928 --- /dev/null +++ b/test/language/future-reserved-words/private-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-3-s +description: > + Strict Mode - SyntaxError is thrown when 'private' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var private = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.22ns.js b/test/language/future-reserved-words/private.js similarity index 100% rename from test/language/future-reserved-words/S7.6.1.2_A1.22ns.js rename to test/language/future-reserved-words/private.js diff --git a/test/language/future-reserved-words/protected-strict-escaped.js b/test/language/future-reserved-words/protected-strict-escaped.js new file mode 100644 index 0000000000..9286ada557 --- /dev/null +++ b/test/language/future-reserved-words/protected-strict-escaped.js @@ -0,0 +1,23 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-24-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: + \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 = 123; diff --git a/test/language/future-reserved-words/protected-strict.js b/test/language/future-reserved-words/protected-strict.js new file mode 100644 index 0000000000..1a4ed8e253 --- /dev/null +++ b/test/language/future-reserved-words/protected-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-8-s +description: > + Strict Mode - SyntaxError is thrown when 'protected' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var protected = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.23ns.js b/test/language/future-reserved-words/protected.js similarity index 100% rename from test/language/future-reserved-words/S7.6.1.2_A1.23ns.js rename to test/language/future-reserved-words/protected.js diff --git a/test/language/future-reserved-words/public-strict-escaped.js b/test/language/future-reserved-words/public-strict-escaped.js new file mode 100644 index 0000000000..8e8f8683a4 --- /dev/null +++ b/test/language/future-reserved-words/public-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-20-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var \u0070\u0075\u0062\u006c\u0069\u0063 = 123; diff --git a/test/language/future-reserved-words/public-strict.js b/test/language/future-reserved-words/public-strict.js new file mode 100644 index 0000000000..dd5111f40e --- /dev/null +++ b/test/language/future-reserved-words/public-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-4-s +description: > + Strict Mode - SyntaxError is thrown when 'public' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var public = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.24ns.js b/test/language/future-reserved-words/public.js similarity index 100% rename from test/language/future-reserved-words/S7.6.1.2_A1.24ns.js rename to test/language/future-reserved-words/public.js diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.25.js b/test/language/future-reserved-words/short.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.25.js rename to test/language/future-reserved-words/short.js index 01681b3c17..f55567a7aa 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.25.js +++ b/test/language/future-reserved-words/short.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "short" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.25 description: Checking if execution of "short=1" succeeds +info: > + `short` was removed from the list of future reserved words in ECMAScript 5. ---*/ var short = 1; diff --git a/test/language/future-reserved-words/static-strict-escaped.js b/test/language/future-reserved-words/static-strict-escaped.js new file mode 100644 index 0000000000..413c2fd4d6 --- /dev/null +++ b/test/language/future-reserved-words/static-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-25-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var \u0073\u0074\u0061\u0074\u0069\u0063 = 123; diff --git a/test/language/future-reserved-words/static-strict.js b/test/language/future-reserved-words/static-strict.js new file mode 100644 index 0000000000..b3bca09f2a --- /dev/null +++ b/test/language/future-reserved-words/static-strict.js @@ -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-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-9-s +description: > + Strict Mode - SyntaxError is thrown when 'static' occurs in strict mode code +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var static = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.26ns.js b/test/language/future-reserved-words/static.js similarity index 100% rename from test/language/future-reserved-words/S7.6.1.2_A1.26ns.js rename to test/language/future-reserved-words/static.js diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.27.js b/test/language/future-reserved-words/super.js similarity index 51% rename from test/language/future-reserved-words/S7.6.1.2_A1.27.js rename to test/language/future-reserved-words/super.js index fae8764e54..ba6fbec800 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.27.js +++ b/test/language/future-reserved-words/super.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "super" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.2_A1.27 description: Checking if execution of "super=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield and await. negative: phase: early type: SyntaxError diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.28.js b/test/language/future-reserved-words/synchronized.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.28.js rename to test/language/future-reserved-words/synchronized.js index 38fe3360eb..a467ae6f00 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.28.js +++ b/test/language/future-reserved-words/synchronized.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "synchronized" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.28 description: Checking if execution of "synchronized=1" succeeds +info: > + `synchronized` was removed from the list of future reserved words in ECMAScript 5. ---*/ var synchronized = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.29.js b/test/language/future-reserved-words/throws.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.29.js rename to test/language/future-reserved-words/throws.js index 712fc0a3be..1724547537 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.29.js +++ b/test/language/future-reserved-words/throws.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "throws" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.29 description: Checking if execution of "throws=1" succeeds +info: > + `throws` was removed from the list of future reserved words in ECMAScript 5. ---*/ var throws = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.30.js b/test/language/future-reserved-words/transient.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.30.js rename to test/language/future-reserved-words/transient.js index 6de5eed997..0e2d96e12e 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.30.js +++ b/test/language/future-reserved-words/transient.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "transient" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.30 description: Checking if execution of "transient=1" succeeds +info: > + `transient` was removed from the list of future reserved words in ECMAScript 5. ---*/ var transient = 1; diff --git a/test/language/future-reserved-words/S7.6.1.2_A1.31.js b/test/language/future-reserved-words/volatile.js similarity index 66% rename from test/language/future-reserved-words/S7.6.1.2_A1.31.js rename to test/language/future-reserved-words/volatile.js index 47b065b12e..43ef199c48 100644 --- a/test/language/future-reserved-words/S7.6.1.2_A1.31.js +++ b/test/language/future-reserved-words/volatile.js @@ -2,9 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "volatile" token can be used as identifier +esid: sec-future-reserved-words es5id: 7.6.1.2_A1.31 description: Checking if execution of "volatile=1" succeeds +info: > + `volatile` was removed from the list of future reserved words in ECMAScript 5. ---*/ var volatile = 1; diff --git a/test/language/future-reserved-words/yield-strict-escaped.js b/test/language/future-reserved-words/yield-strict-escaped.js new file mode 100644 index 0000000000..9745458248 --- /dev/null +++ b/test/language/future-reserved-words/yield-strict-escaped.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1-21-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: \u0079ield (yield) +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var \u0079ield = 123; diff --git a/test/language/future-reserved-words/yield-strict.js b/test/language/future-reserved-words/yield-strict.js new file mode 100644 index 0000000000..b81660f1bb --- /dev/null +++ b/test/language/future-reserved-words/yield-strict.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1.2-5-s +description: > + Strict Mode - SyntaxError is thrown when ReservedWord + 'yield' occurs in strict mode code +info: | + BindingIdentifier : yield + + It is a Syntax Error if the code matched by this production is contained in strict mode code. +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +var yield = 1; diff --git a/test/language/import/escaped-as-import-specifier.js b/test/language/import/escaped-as-import-specifier.js new file mode 100644 index 0000000000..1d3815a100 --- /dev/null +++ b/test/language/import/escaped-as-import-specifier.js @@ -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. + +/*--- +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; + +import {a \u0061s b} from "./escaped-as-import-specifier.js"; diff --git a/test/language/import/escaped-as-namespace-import.js b/test/language/import/escaped-as-namespace-import.js new file mode 100644 index 0000000000..8c92473690 --- /dev/null +++ b/test/language/import/escaped-as-namespace-import.js @@ -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 `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] +---*/ + +import* \u0061s self from "./escaped-as-namespace-import.js"; diff --git a/test/language/import/escaped-from.js b/test/language/import/escaped-from.js new file mode 100644 index 0000000000..7b272b14f8 --- /dev/null +++ b/test/language/import/escaped-from.js @@ -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] +---*/ + +import {} \u0066rom "./escaped-from.js"; diff --git a/test/language/keywords/S7.6.1.1_A1.18.js b/test/language/keywords/S7.6.1.1_A1.18.js deleted file mode 100644 index 60c5f94317..0000000000 --- a/test/language/keywords/S7.6.1.1_A1.18.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "this" token can not be used as identifier -es5id: 7.6.1.1_A1.18 -description: Checking if execution of "this=1" fails -negative: - phase: early - type: ReferenceError ----*/ - -this = 1; diff --git a/test/language/keywords/S7.6.1.1_A1.1.js b/test/language/keywords/ident-ref-break.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.1.js rename to test/language/keywords/ident-ref-break.js index b272cb85dd..77fe435224 100644 --- a/test/language/keywords/S7.6.1.1_A1.1.js +++ b/test/language/keywords/ident-ref-break.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "break" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.1 description: Checking if execution of "break=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.2.js b/test/language/keywords/ident-ref-case.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.2.js rename to test/language/keywords/ident-ref-case.js index 9d1416c61a..142d6a5e96 100644 --- a/test/language/keywords/S7.6.1.1_A1.2.js +++ b/test/language/keywords/ident-ref-case.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "case" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.2 description: Checking if execution of "case=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.3.js b/test/language/keywords/ident-ref-catch.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.3.js rename to test/language/keywords/ident-ref-catch.js index 38ea1915d7..3418056d44 100644 --- a/test/language/keywords/S7.6.1.1_A1.3.js +++ b/test/language/keywords/ident-ref-catch.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "catch" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.3 description: Checking if execution of "catch=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.4.js b/test/language/keywords/ident-ref-continue.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.4.js rename to test/language/keywords/ident-ref-continue.js index 65c97315ce..ae5ea45f8d 100644 --- a/test/language/keywords/S7.6.1.1_A1.4.js +++ b/test/language/keywords/ident-ref-continue.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "continue" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.4 description: Checking if execution of "contunue=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.5.js b/test/language/keywords/ident-ref-default.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.5.js rename to test/language/keywords/ident-ref-default.js index 1c6f9c5e88..e5a24239bb 100644 --- a/test/language/keywords/S7.6.1.1_A1.5.js +++ b/test/language/keywords/ident-ref-default.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "default" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.5 description: Checking if execution of "default=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.6.js b/test/language/keywords/ident-ref-delete.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.6.js rename to test/language/keywords/ident-ref-delete.js index e8eeac7647..755068558f 100644 --- a/test/language/keywords/S7.6.1.1_A1.6.js +++ b/test/language/keywords/ident-ref-delete.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "delete" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.6 description: Checking if execution of "delete=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.7.js b/test/language/keywords/ident-ref-do.js similarity index 51% rename from test/language/keywords/S7.6.1.1_A1.7.js rename to test/language/keywords/ident-ref-do.js index 310e6476b3..18cf089e64 100644 --- a/test/language/keywords/S7.6.1.1_A1.7.js +++ b/test/language/keywords/ident-ref-do.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "do" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.7 description: Checking if execution of "do=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.8.js b/test/language/keywords/ident-ref-else.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.8.js rename to test/language/keywords/ident-ref-else.js index 8c5817b86d..63b3b2b971 100644 --- a/test/language/keywords/S7.6.1.1_A1.8.js +++ b/test/language/keywords/ident-ref-else.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "else" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.8 description: Checking if execution of "else=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.9.js b/test/language/keywords/ident-ref-finally.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.9.js rename to test/language/keywords/ident-ref-finally.js index e4fe13f21d..110271698b 100644 --- a/test/language/keywords/S7.6.1.1_A1.9.js +++ b/test/language/keywords/ident-ref-finally.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "finally" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.9 description: Checking if execution of "finally=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.10.js b/test/language/keywords/ident-ref-for.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.10.js rename to test/language/keywords/ident-ref-for.js index b3d6b9eab5..58538df962 100644 --- a/test/language/keywords/S7.6.1.1_A1.10.js +++ b/test/language/keywords/ident-ref-for.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "for" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.10 description: Checking if execution of "for=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.11.js b/test/language/keywords/ident-ref-function.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.11.js rename to test/language/keywords/ident-ref-function.js index 6e1479e5f4..c6a6046ae8 100644 --- a/test/language/keywords/S7.6.1.1_A1.11.js +++ b/test/language/keywords/ident-ref-function.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "function" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.11 description: Checking if execution of "function=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.12.js b/test/language/keywords/ident-ref-if.js similarity index 51% rename from test/language/keywords/S7.6.1.1_A1.12.js rename to test/language/keywords/ident-ref-if.js index ce3672ffd6..02e3614ef0 100644 --- a/test/language/keywords/S7.6.1.1_A1.12.js +++ b/test/language/keywords/ident-ref-if.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "if" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.12 description: Checking if execution of "if=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.13.js b/test/language/keywords/ident-ref-in.js similarity index 51% rename from test/language/keywords/S7.6.1.1_A1.13.js rename to test/language/keywords/ident-ref-in.js index 4e9d4f00c9..a3cf5c79b0 100644 --- a/test/language/keywords/S7.6.1.1_A1.13.js +++ b/test/language/keywords/ident-ref-in.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "in" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.13 description: Checking if execution of "in=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.14.js b/test/language/keywords/ident-ref-instanceof.js similarity index 53% rename from test/language/keywords/S7.6.1.1_A1.14.js rename to test/language/keywords/ident-ref-instanceof.js index 9331350253..26bb6b3199 100644 --- a/test/language/keywords/S7.6.1.1_A1.14.js +++ b/test/language/keywords/ident-ref-instanceof.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "instanceof" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.14 description: Checking if execution of "instanceof=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.15.js b/test/language/keywords/ident-ref-new.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.15.js rename to test/language/keywords/ident-ref-new.js index 6c0865e11d..aef6ecd1d3 100644 --- a/test/language/keywords/S7.6.1.1_A1.15.js +++ b/test/language/keywords/ident-ref-new.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "new" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.15 description: Checking if execution of "new=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.16.js b/test/language/keywords/ident-ref-return.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.16.js rename to test/language/keywords/ident-ref-return.js index 693b32ec07..33b6c8b6ac 100644 --- a/test/language/keywords/S7.6.1.1_A1.16.js +++ b/test/language/keywords/ident-ref-return.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "return" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.16 description: Checking if execution of "return=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.17.js b/test/language/keywords/ident-ref-switch.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.17.js rename to test/language/keywords/ident-ref-switch.js index d388331d06..a4b7b0586a 100644 --- a/test/language/keywords/S7.6.1.1_A1.17.js +++ b/test/language/keywords/ident-ref-switch.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "switch" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.17 description: Checking if execution of "switch=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/ident-ref-this.js b/test/language/keywords/ident-ref-this.js new file mode 100644 index 0000000000..825c816317 --- /dev/null +++ b/test/language/keywords/ident-ref-this.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +es5id: 7.6.1.1_A1.18 +description: Checking if execution of "this=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +// It's tempting to write `this = 0`, but that'd be a test to validate `this` +// is not a valid simple assignment target, cf. tests in language/expressions/assignment. +// Also see: sec-semantics-static-semantics-isvalidsimpleassignmenttarget +({this}); diff --git a/test/language/keywords/S7.6.1.1_A1.19.js b/test/language/keywords/ident-ref-throw.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.19.js rename to test/language/keywords/ident-ref-throw.js index 6f74ed30df..6bde82398a 100644 --- a/test/language/keywords/S7.6.1.1_A1.19.js +++ b/test/language/keywords/ident-ref-throw.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "throw" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.19 description: Checking if execution of "throw=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.20.js b/test/language/keywords/ident-ref-try.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.20.js rename to test/language/keywords/ident-ref-try.js index cde696e305..acf2564fd8 100644 --- a/test/language/keywords/S7.6.1.1_A1.20.js +++ b/test/language/keywords/ident-ref-try.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "try" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.20 description: Checking if execution of "try=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.21.js b/test/language/keywords/ident-ref-typeof.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.21.js rename to test/language/keywords/ident-ref-typeof.js index e7728c46ca..828411a58a 100644 --- a/test/language/keywords/S7.6.1.1_A1.21.js +++ b/test/language/keywords/ident-ref-typeof.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "typeof" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.21 description: Checking if execution of "typeof=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.22.js b/test/language/keywords/ident-ref-var.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.22.js rename to test/language/keywords/ident-ref-var.js index 91f643325d..0d7e5730e2 100644 --- a/test/language/keywords/S7.6.1.1_A1.22.js +++ b/test/language/keywords/ident-ref-var.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "var" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.22 description: Checking if execution of "var=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.23.js b/test/language/keywords/ident-ref-void.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.23.js rename to test/language/keywords/ident-ref-void.js index c1e3120051..e038f917ee 100644 --- a/test/language/keywords/S7.6.1.1_A1.23.js +++ b/test/language/keywords/ident-ref-void.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "void" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.23 description: Checking if execution of "void=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.24.js b/test/language/keywords/ident-ref-while.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.24.js rename to test/language/keywords/ident-ref-while.js index 9fb3767f18..4637dedad0 100644 --- a/test/language/keywords/S7.6.1.1_A1.24.js +++ b/test/language/keywords/ident-ref-while.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "while" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.24 description: Checking if execution of "while=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/keywords/S7.6.1.1_A1.25.js b/test/language/keywords/ident-ref-with.js similarity index 52% rename from test/language/keywords/S7.6.1.1_A1.25.js rename to test/language/keywords/ident-ref-with.js index 869d56d519..da3e4e749b 100644 --- a/test/language/keywords/S7.6.1.1_A1.25.js +++ b/test/language/keywords/ident-ref-with.js @@ -2,9 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The "with" token can not be used as identifier +esid: sec-identifiers-static-semantics-early-errors es5id: 7.6.1.1_A1.25 description: Checking if execution of "with=1" fails +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. negative: phase: early type: SyntaxError diff --git a/test/language/reserved-words/7.6.1-1-1.js b/test/language/reserved-words/7.6.1-1-1.js deleted file mode 100644 index e266859f05..0000000000 --- a/test/language/reserved-words/7.6.1-1-1.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-1 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: null, true, false ----*/ - - var tokenCodes = { - null: 0, - true: 1, - false: 2 - }; - var arr = [ - 'null', - 'true', - 'false' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-10.js b/test/language/reserved-words/7.6.1-1-10.js deleted file mode 100644 index dc8c5a3390..0000000000 --- a/test/language/reserved-words/7.6.1-1-10.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-10 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: in, try, class ----*/ - - var tokenCodes = { - in: 0, - try: 1, - class: 2 - }; - var arr = [ - 'in', - 'try', - 'class' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-11.js b/test/language/reserved-words/7.6.1-1-11.js deleted file mode 100644 index b0028f79dd..0000000000 --- a/test/language/reserved-words/7.6.1-1-11.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-11 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: enum, extends, super ----*/ - - var tokenCodes = { - enum: 0, - extends: 1, - super: 2 - }; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-12.js b/test/language/reserved-words/7.6.1-1-12.js deleted file mode 100644 index 68d419c2c2..0000000000 --- a/test/language/reserved-words/7.6.1-1-12.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-12 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: const, export, import ----*/ - - var tokenCodes = { - const: 0, - export: 1, - import: 2 - }; - var arr = [ - 'const', - 'export', - 'import' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-13.js b/test/language/reserved-words/7.6.1-1-13.js deleted file mode 100644 index 4aa5743784..0000000000 --- a/test/language/reserved-words/7.6.1-1-13.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-13 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: implements, let, private ----*/ - - var tokenCodes = { - implements: 0, - let: 1, - private: 2 - }; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-14.js b/test/language/reserved-words/7.6.1-1-14.js deleted file mode 100644 index 541dd17505..0000000000 --- a/test/language/reserved-words/7.6.1-1-14.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-14 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: public, yield, interface ----*/ - - var tokenCodes = { - public: 0, - yield: 1, - interface: 2 - }; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-15.js b/test/language/reserved-words/7.6.1-1-15.js deleted file mode 100644 index aa3bc86d0f..0000000000 --- a/test/language/reserved-words/7.6.1-1-15.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-15 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: package, protected, static ----*/ - - var tokenCodes = { - package: 0, - protected: 1, - static: 2 - }; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-16.js b/test/language/reserved-words/7.6.1-1-16.js deleted file mode 100644 index cfe3b123e5..0000000000 --- a/test/language/reserved-words/7.6.1-1-16.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-16 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: undeefined, NaN, Infinity ----*/ - - var tokenCodes = { - undefined: 0, - NaN: 1, - Infinity: 2 - }; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-2.js b/test/language/reserved-words/7.6.1-1-2.js deleted file mode 100644 index 67fdd5b4cc..0000000000 --- a/test/language/reserved-words/7.6.1-1-2.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-2 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: break, case, do ----*/ - - var tokenCodes = { - break: 0, - case: 1, - do: 2 - }; - var arr = [ - 'break', - 'case', - 'do' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-3.js b/test/language/reserved-words/7.6.1-1-3.js deleted file mode 100644 index 8c0ccf9fea..0000000000 --- a/test/language/reserved-words/7.6.1-1-3.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-3 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: instanceof, typeof, else ----*/ - - var tokenCodes = { - instanceof: 0, - typeof: 1, - else: 2 - }; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-4.js b/test/language/reserved-words/7.6.1-1-4.js deleted file mode 100644 index 47758acc56..0000000000 --- a/test/language/reserved-words/7.6.1-1-4.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-4 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: new, var, catch ----*/ - - var tokenCodes = { - new: 0, - var: 1, - catch: 2 - }; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-5.js b/test/language/reserved-words/7.6.1-1-5.js deleted file mode 100644 index dcb93a8564..0000000000 --- a/test/language/reserved-words/7.6.1-1-5.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-5 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: finally, return, void ----*/ - - var tokenCodes = { - finally: 0, - return: 1, - void: 2 - }; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-6.js b/test/language/reserved-words/7.6.1-1-6.js deleted file mode 100644 index 31146148d3..0000000000 --- a/test/language/reserved-words/7.6.1-1-6.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-6 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: continue, for, switch ----*/ - - var tokenCodes = { - continue: 0, - for: 1, - switch: 2 - }; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-7.js b/test/language/reserved-words/7.6.1-1-7.js deleted file mode 100644 index 4fd122a3b4..0000000000 --- a/test/language/reserved-words/7.6.1-1-7.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-7 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: while, debugger, function ----*/ - - var tokenCodes = { - while: 0, - debugger: 1, - function: 2 - }; - var arr = [ - 'while' , - 'debugger', - 'function' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-8.js b/test/language/reserved-words/7.6.1-1-8.js deleted file mode 100644 index 2a2adad579..0000000000 --- a/test/language/reserved-words/7.6.1-1-8.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-8 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: this, with, default ----*/ - - var tokenCodes = { - this: 0, - with: 1, - default: 2 - }; - var arr = [ - 'this', - 'with', - 'default' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-1-9.js b/test/language/reserved-words/7.6.1-1-9.js deleted file mode 100644 index ce170fd135..0000000000 --- a/test/language/reserved-words/7.6.1-1-9.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-1-9 -description: > - Allow reserved words as property names at object initialization, - verified with hasOwnProperty: if, throw, delete ----*/ - - var tokenCodes = { - if: 0, - throw: 1, - delete: 2 - }; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-1.js b/test/language/reserved-words/7.6.1-2-1.js deleted file mode 100644 index b7da94dad8..0000000000 --- a/test/language/reserved-words/7.6.1-2-1.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-1 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: null, true, false ----*/ - - var tokenCodes = {}; - tokenCodes.null = 0; - tokenCodes.true = 1; - tokenCodes.false = 2; - var arr = [ - 'null', - 'true', - 'false' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-10.js b/test/language/reserved-words/7.6.1-2-10.js deleted file mode 100644 index 8fccd0e4be..0000000000 --- a/test/language/reserved-words/7.6.1-2-10.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-10 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: in, try, class ----*/ - - var tokenCodes = {}; - tokenCodes.in = 0; - tokenCodes.try = 1; - tokenCodes.class = 2; - var arr = [ - 'in', - 'try', - 'class' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-11.js b/test/language/reserved-words/7.6.1-2-11.js deleted file mode 100644 index 89ce1886f0..0000000000 --- a/test/language/reserved-words/7.6.1-2-11.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-11 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: enum, extends, super ----*/ - - var tokenCodes = {}; - tokenCodes.enum = 0; - tokenCodes.extends = 1; - tokenCodes.super = 2; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-12.js b/test/language/reserved-words/7.6.1-2-12.js deleted file mode 100644 index 51aac3fd46..0000000000 --- a/test/language/reserved-words/7.6.1-2-12.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-12 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: const, export, import ----*/ - - var tokenCodes = {}; - tokenCodes.const = 0; - tokenCodes.export = 1; - tokenCodes.import = 2; - var arr = [ - 'const', - 'export', - 'import' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-13.js b/test/language/reserved-words/7.6.1-2-13.js deleted file mode 100644 index e2778ed0fb..0000000000 --- a/test/language/reserved-words/7.6.1-2-13.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-13 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: implements, let, private ----*/ - - var tokenCodes = {}; - tokenCodes.implements = 0; - tokenCodes.let = 1; - tokenCodes.private = 2; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-14.js b/test/language/reserved-words/7.6.1-2-14.js deleted file mode 100644 index 8146cd25fd..0000000000 --- a/test/language/reserved-words/7.6.1-2-14.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-14 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: public, yield, interface ----*/ - - var tokenCodes = {}; - tokenCodes.public = 0; - tokenCodes.yield = 1; - tokenCodes.interface = 2; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-15.js b/test/language/reserved-words/7.6.1-2-15.js deleted file mode 100644 index cb5be454b4..0000000000 --- a/test/language/reserved-words/7.6.1-2-15.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-15 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: package, protected, static ----*/ - - var tokenCodes = {}; - tokenCodes.package = 0; - tokenCodes.protected = 1; - tokenCodes.static = 2; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-16.js b/test/language/reserved-words/7.6.1-2-16.js deleted file mode 100644 index 4c22b3dc63..0000000000 --- a/test/language/reserved-words/7.6.1-2-16.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-16 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: undefined, NaN, Infinity ----*/ - - var tokenCodes = {}; - tokenCodes.undefined = 0; - tokenCodes.NaN = 1; - tokenCodes.Infinity = 2; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-2.js b/test/language/reserved-words/7.6.1-2-2.js deleted file mode 100644 index d95aeb71f2..0000000000 --- a/test/language/reserved-words/7.6.1-2-2.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-2 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: break, case, do ----*/ - - var tokenCodes = {}; - tokenCodes.break = 0; - tokenCodes.case = 1; - tokenCodes.do = 2; - var arr = [ - 'break', - 'case', - 'do' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-3.js b/test/language/reserved-words/7.6.1-2-3.js deleted file mode 100644 index 1d3374dc08..0000000000 --- a/test/language/reserved-words/7.6.1-2-3.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-3 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: instanceof, typeof, else ----*/ - - var tokenCodes = {}; - tokenCodes.instanceof = 0; - tokenCodes.typeof = 1; - tokenCodes.else = 2; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-4.js b/test/language/reserved-words/7.6.1-2-4.js deleted file mode 100644 index d4b3ad549a..0000000000 --- a/test/language/reserved-words/7.6.1-2-4.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-4 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: new, var, catch ----*/ - - var tokenCodes = {}; - tokenCodes.new = 0; - tokenCodes.var = 1; - tokenCodes.catch = 2; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-5.js b/test/language/reserved-words/7.6.1-2-5.js deleted file mode 100644 index fb1cda05c6..0000000000 --- a/test/language/reserved-words/7.6.1-2-5.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-5 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: finally, return, void ----*/ - - var tokenCodes = {}; - tokenCodes.finally = 0; - tokenCodes.return = 1; - tokenCodes.void = 2; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-6.js b/test/language/reserved-words/7.6.1-2-6.js deleted file mode 100644 index a506cc0eaf..0000000000 --- a/test/language/reserved-words/7.6.1-2-6.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-6 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: continue, for, switch ----*/ - - var tokenCodes = {}; - tokenCodes.continue = 0; - tokenCodes.for = 1; - tokenCodes.switch = 2; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-7.js b/test/language/reserved-words/7.6.1-2-7.js deleted file mode 100644 index 8d9991db61..0000000000 --- a/test/language/reserved-words/7.6.1-2-7.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-7 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: while, debugger, function ----*/ - - var tokenCodes = {}; - tokenCodes.while = 0; - tokenCodes.debugger = 1; - tokenCodes.function = 2; - var arr = [ - 'while' , - 'debugger', - 'function' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-8.js b/test/language/reserved-words/7.6.1-2-8.js deleted file mode 100644 index dcfb2edbbd..0000000000 --- a/test/language/reserved-words/7.6.1-2-8.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-8 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: this, with, default ----*/ - - var tokenCodes = {}; - tokenCodes.this = 0; - tokenCodes.with = 1; - tokenCodes.default = 2; - var arr = [ - 'this', - 'with', - 'default' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-2-9.js b/test/language/reserved-words/7.6.1-2-9.js deleted file mode 100644 index 672dd151d5..0000000000 --- a/test/language/reserved-words/7.6.1-2-9.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-2-9 -description: > - Allow reserved words as property names by dot operator assignment, - verified with hasOwnProperty: if, throw, delete ----*/ - - var tokenCodes = {}; - tokenCodes.if = 0; - tokenCodes.throw = 1; - tokenCodes.delete = 2; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-1.js b/test/language/reserved-words/7.6.1-3-1.js deleted file mode 100644 index b4fe62f18b..0000000000 --- a/test/language/reserved-words/7.6.1-3-1.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-1 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: null, true, false ----*/ - - var tokenCodes = {}; - tokenCodes['null'] = 0; - tokenCodes['true'] = 1; - tokenCodes['false'] = 2; - var arr = [ - 'null', - 'true', - 'false' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-10.js b/test/language/reserved-words/7.6.1-3-10.js deleted file mode 100644 index fc3cfdaf0b..0000000000 --- a/test/language/reserved-words/7.6.1-3-10.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-10 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: in, try, class ----*/ - - var tokenCodes = {}; - tokenCodes['in'] = 0; - tokenCodes['try'] = 1; - tokenCodes['class'] = 2; - var arr = [ - 'in', - 'try', - 'class' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-11.js b/test/language/reserved-words/7.6.1-3-11.js deleted file mode 100644 index 11760acac2..0000000000 --- a/test/language/reserved-words/7.6.1-3-11.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-11 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: enum, extends, super ----*/ - - var tokenCodes = {}; - tokenCodes['enum'] = 0; - tokenCodes['extends'] = 1; - tokenCodes['super'] = 2; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-12.js b/test/language/reserved-words/7.6.1-3-12.js deleted file mode 100644 index 6ac38776a2..0000000000 --- a/test/language/reserved-words/7.6.1-3-12.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-12 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: const, export, import ----*/ - - var tokenCodes = {}; - tokenCodes['const'] = 0; - tokenCodes['export'] = 1; - tokenCodes['import'] = 2; - var arr = [ - 'const', - 'export', - 'import' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-13.js b/test/language/reserved-words/7.6.1-3-13.js deleted file mode 100644 index 30295413ac..0000000000 --- a/test/language/reserved-words/7.6.1-3-13.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-13 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: implements, let, private ----*/ - - var tokenCodes = {}; - tokenCodes['implements'] = 0; - tokenCodes['let'] = 1; - tokenCodes['private'] = 2; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-14.js b/test/language/reserved-words/7.6.1-3-14.js deleted file mode 100644 index 5ecf63f102..0000000000 --- a/test/language/reserved-words/7.6.1-3-14.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-14 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: public, yield, interface ----*/ - - var tokenCodes = {}; - tokenCodes['public'] = 0; - tokenCodes['yield'] = 1; - tokenCodes['interface'] = 2; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-15.js b/test/language/reserved-words/7.6.1-3-15.js deleted file mode 100644 index 30b8cbe1c2..0000000000 --- a/test/language/reserved-words/7.6.1-3-15.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-15 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: package, protected, static ----*/ - - var tokenCodes = {}; - tokenCodes['package'] = 0; - tokenCodes['protected'] = 1; - tokenCodes['static'] = 2; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-16.js b/test/language/reserved-words/7.6.1-3-16.js deleted file mode 100644 index cade684d40..0000000000 --- a/test/language/reserved-words/7.6.1-3-16.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-16 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: undefined, NaN, Infinity ----*/ - - var tokenCodes = {}; - tokenCodes['undefined'] = 0; - tokenCodes['NaN'] = 1; - tokenCodes['Infinity'] = 2; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-2.js b/test/language/reserved-words/7.6.1-3-2.js deleted file mode 100644 index 966beaed8e..0000000000 --- a/test/language/reserved-words/7.6.1-3-2.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-2 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: break, case, do ----*/ - - var tokenCodes = {}; - tokenCodes['break'] = 0; - tokenCodes['case'] = 1; - tokenCodes['do'] = 2; - var arr = [ - 'break', - 'case', - 'do' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-3.js b/test/language/reserved-words/7.6.1-3-3.js deleted file mode 100644 index 65969a5512..0000000000 --- a/test/language/reserved-words/7.6.1-3-3.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-3 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: instanceof, typeof, else ----*/ - - var tokenCodes = {}; - tokenCodes['instanceof'] = 0; - tokenCodes['typeof'] = 1; - tokenCodes['else'] = 2; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-4.js b/test/language/reserved-words/7.6.1-3-4.js deleted file mode 100644 index 709f50c81f..0000000000 --- a/test/language/reserved-words/7.6.1-3-4.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-4 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: new, var, catch ----*/ - - var tokenCodes = {}; - tokenCodes['new'] = 0; - tokenCodes['var'] = 1; - tokenCodes['catch'] = 2; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-5.js b/test/language/reserved-words/7.6.1-3-5.js deleted file mode 100644 index a19b8e05ca..0000000000 --- a/test/language/reserved-words/7.6.1-3-5.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-5 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: finally, return, void ----*/ - - var tokenCodes = {}; - tokenCodes['finally'] = 0; - tokenCodes['return'] = 1; - tokenCodes['void'] = 2; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-6.js b/test/language/reserved-words/7.6.1-3-6.js deleted file mode 100644 index c37dd1089c..0000000000 --- a/test/language/reserved-words/7.6.1-3-6.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-6 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: continue, for, switch ----*/ - - var tokenCodes = {}; - tokenCodes['continue'] = 0; - tokenCodes['for'] = 1; - tokenCodes['switch'] = 2; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-7.js b/test/language/reserved-words/7.6.1-3-7.js deleted file mode 100644 index 0d3a7f639b..0000000000 --- a/test/language/reserved-words/7.6.1-3-7.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-7 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: while, debugger, function ----*/ - - var tokenCodes = {}; - tokenCodes['while'] = 0; - tokenCodes['debugger'] = 1; - tokenCodes['function'] = 2; - var arr = [ - 'while', - 'debugger', - 'function' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-8.js b/test/language/reserved-words/7.6.1-3-8.js deleted file mode 100644 index e0a49e2f54..0000000000 --- a/test/language/reserved-words/7.6.1-3-8.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-8 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: this, with, default ----*/ - - var tokenCodes = {}; - tokenCodes['this'] = 0; - tokenCodes['with'] = 1; - tokenCodes['default'] = 2; - var arr = [ - 'this', - 'with', - 'default' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-3-9.js b/test/language/reserved-words/7.6.1-3-9.js deleted file mode 100644 index 5dea91a629..0000000000 --- a/test/language/reserved-words/7.6.1-3-9.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-3-9 -description: > - Allow reserved words as property names by index - assignment,verified with hasOwnProperty: if, throw, delete ----*/ - - var tokenCodes = {}; - tokenCodes['if'] = 0; - tokenCodes['throw'] = 1; - tokenCodes['delete'] = 2; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-1.js b/test/language/reserved-words/7.6.1-4-1.js deleted file mode 100644 index 4a7a6ae921..0000000000 --- a/test/language/reserved-words/7.6.1-4-1.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-1 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: null, true, false ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set null(value) { - test0 = value; - }, - get null() { - return test0; - }, - set true(value) { - test1 = value; - }, - get true() { - return test1; - }, - set false(value) { - test2 = value; - }, - get false(){ - return test2; - } - }; - var arr = [ - 'null', - 'true', - 'false' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-10.js b/test/language/reserved-words/7.6.1-4-10.js deleted file mode 100644 index 29a0c5fd46..0000000000 --- a/test/language/reserved-words/7.6.1-4-10.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-10 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: in, try, class ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set in(value){ - test0 = value; - }, - get in(){ - return test0; - }, - set try(value){ - test1 = value; - }, - get try(){ - return test1 - }, - set class(value){ - test2 = value; - }, - get class(){ - return test2; - } - }; - var arr = [ - 'in', - 'try', - 'class' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-11.js b/test/language/reserved-words/7.6.1-4-11.js deleted file mode 100644 index 7e875e1b68..0000000000 --- a/test/language/reserved-words/7.6.1-4-11.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-11 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: enum, extends, super ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set enum(value){ - test0 = value; - }, - get enum(){ - return test0; - }, - set extends(value){ - test1 = value; - }, - get extends(){ - return test1; - }, - set super(value){ - test2 = value; - }, - get super(){ - return test2; - } - }; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-12.js b/test/language/reserved-words/7.6.1-4-12.js deleted file mode 100644 index 051b2a8a7e..0000000000 --- a/test/language/reserved-words/7.6.1-4-12.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-12 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: const, export, import ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set const(value){ - test0 = value; - }, - get const(){ - return test0; - }, - set export(value){ - test1 = value; - }, - get export(){ - return test1 - }, - set import(value){ - test2 = value; - }, - get import(){ - return test2 - } - }; - var arr = [ - 'const', - 'export', - 'import' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-13.js b/test/language/reserved-words/7.6.1-4-13.js deleted file mode 100644 index 69a79f9ae3..0000000000 --- a/test/language/reserved-words/7.6.1-4-13.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-13 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: implements, let, private ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set implements(value){ - test0 = value; - }, - get implements(){ - return test0; - }, - set let(value){ - test1 = value; - }, - get let(){ - return test1 - }, - set private(value){ - test2 = value; - }, - get private(){ - return test2; - } - }; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-14.js b/test/language/reserved-words/7.6.1-4-14.js deleted file mode 100644 index 152021a1bc..0000000000 --- a/test/language/reserved-words/7.6.1-4-14.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-14 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: public, yield, interface ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set public(value){ - test0 = value; - }, - get public(){ - return test0; - }, - set yield(value){ - test1 = value; - }, - get yield(){ - return test1; - }, - set interface(value){ - test2 = value; - }, - get interface(){ - return test2; - } - }; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-15.js b/test/language/reserved-words/7.6.1-4-15.js deleted file mode 100644 index 8e25906549..0000000000 --- a/test/language/reserved-words/7.6.1-4-15.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-15 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: package, protected, static ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set package(value){ - test0 = value; - }, - get package(){ - return test0; - }, - set protected(value){ - test1 = value; - }, - get protected(){ - return test1 - }, - set static(value){ - test2 = value; - }, - get static(){ - return test2; - } - }; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-16.js b/test/language/reserved-words/7.6.1-4-16.js deleted file mode 100644 index f7c3800b59..0000000000 --- a/test/language/reserved-words/7.6.1-4-16.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-16 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: undefined, NaN, Infinity ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set undefined(value){ - test0 = value; - }, - get undefined(){ - return test0; - }, - set NaN(value){ - test1 = value; - }, - get NaN(){ - return test1; - }, - set Infinity(value){ - test2 = value; - }, - get Infinity(){ - return test2; - } - }; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-2.js b/test/language/reserved-words/7.6.1-4-2.js deleted file mode 100644 index 73ab9e8f89..0000000000 --- a/test/language/reserved-words/7.6.1-4-2.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-2 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: break, case, do ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set break(value){ - test0 = value; - }, - get break(){ - return test0; - }, - set case(value){ - test1 = value; - }, - get case(){ - return test1; - }, - set do(value){ - test2 = value; - }, - get do(){ - return test2; - } - }; - var arr = [ - 'break', - 'case', - 'do' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-3.js b/test/language/reserved-words/7.6.1-4-3.js deleted file mode 100644 index 99684a6c6a..0000000000 --- a/test/language/reserved-words/7.6.1-4-3.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-3 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: instanceof, typeof, else ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set instanceof(value){ - test0 = value; - }, - get instanceof(){ - return test0; - }, - set typeof(value){ - test1 = value; - }, - get typeof(){ - return test1; - }, - set else(value){ - test2 = value; - }, - get else(){ - return test2; - } - }; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-4.js b/test/language/reserved-words/7.6.1-4-4.js deleted file mode 100644 index a7c3144080..0000000000 --- a/test/language/reserved-words/7.6.1-4-4.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-4 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: new, var, catch ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set new(value){ - test0 = value; - }, - get new(){ - return test0; - }, - set var(value){ - test1 = value; - }, - get var(){ - return test1; - }, - set catch(value){ - test2 = value; - }, - get catch(){ - return test2; - } - }; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-5.js b/test/language/reserved-words/7.6.1-4-5.js deleted file mode 100644 index df01004fdd..0000000000 --- a/test/language/reserved-words/7.6.1-4-5.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-5 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: finally, return, void ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set finally(value){ - test0 = value; - }, - get finally(){ - return test0; - }, - set return(value){ - test1 = value; - }, - get return(){ - return test1; - }, - set void(value){ - test2 = value; - }, - get void(){ - return test2; - } - }; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-6.js b/test/language/reserved-words/7.6.1-4-6.js deleted file mode 100644 index fbd5e27765..0000000000 --- a/test/language/reserved-words/7.6.1-4-6.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-6 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: continue, for, switch ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set continue(value){ - test0 = value; - }, - get continue(){ - return test0; - }, - set for(value){ - test1 = value; - }, - get for(){ - return test1; - }, - set switch(value){ - test2 = value; - }, - get switch(){ - return test2; - } - }; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-7.js b/test/language/reserved-words/7.6.1-4-7.js deleted file mode 100644 index 7f5a957f9e..0000000000 --- a/test/language/reserved-words/7.6.1-4-7.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-7 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: while, debugger, function ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set while(value){ - test0 = value; - }, - get while(){ - return test0 - }, - set debugger(value){ - test1 = value; - }, - get debugger(){ - return test1; - }, - set function(value){ - test2 = value; - }, - get function(){ - return test2; - } - }; - var arr = [ - 'while' , - 'debugger', - 'function' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-8.js b/test/language/reserved-words/7.6.1-4-8.js deleted file mode 100644 index 29e2fdc25e..0000000000 --- a/test/language/reserved-words/7.6.1-4-8.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-8 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: this, with, default ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set this(value){ - test0 = value; - }, - get this(){ - return test0; - }, - set with(value){ - test1 = value; - }, - get with(){ - return test1; - }, - set default(value){ - test2 = value; - }, - get default(){ - return test2; - } - }; - var arr = [ - 'this', - 'with', - 'default' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-4-9.js b/test/language/reserved-words/7.6.1-4-9.js deleted file mode 100644 index e71237849a..0000000000 --- a/test/language/reserved-words/7.6.1-4-9.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-4-9 -description: > - Allow reserved words as property names by set function within an - object, verified with hasOwnProperty: if, throw, delete ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set if(value){ - test0 = value; - }, - get if(){ - return test0; - }, - set throw(value){ - test1 = value; - }, - get throw(){ - return test1 - }, - set delete(value){ - test2 = value; - }, - get delete(){ - return test2; - } - }; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for(var p in tokenCodes) { - for(var p1 in arr) { - if(arr[p1] === p) { - assert(tokenCodes.hasOwnProperty(arr[p1]), 'tokenCodes.hasOwnProperty(arr[p1]) !== true'); - } - } - } diff --git a/test/language/reserved-words/7.6.1-5-1.js b/test/language/reserved-words/7.6.1-5-1.js deleted file mode 100644 index e0a01a0764..0000000000 --- a/test/language/reserved-words/7.6.1-5-1.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-1 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: null, true, false ----*/ - - var tokenCodes = { - null: 0, - true: 1, - false: 2 - }; - var arr = [ - 'null', - 'true', - 'false' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-10.js b/test/language/reserved-words/7.6.1-5-10.js deleted file mode 100644 index e285af4064..0000000000 --- a/test/language/reserved-words/7.6.1-5-10.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-10 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: in, try, class ----*/ - - var tokenCodes = { - in: 0, - try: 1, - class: 2 - }; - var arr = [ - 'in', - 'try', - 'class' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-11.js b/test/language/reserved-words/7.6.1-5-11.js deleted file mode 100644 index 1b28cff115..0000000000 --- a/test/language/reserved-words/7.6.1-5-11.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-11 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: enum, extends, super ----*/ - - var tokenCodes = { - enum: 0, - extends: 1, - super: 2 - }; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-12.js b/test/language/reserved-words/7.6.1-5-12.js deleted file mode 100644 index eb7dfd0bfb..0000000000 --- a/test/language/reserved-words/7.6.1-5-12.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-12 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: const, export, import ----*/ - - var tokenCodes = { - const : 0, - export: 1, - import: 2 - }; - var arr = [ - 'const', - 'export', - 'import' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-13.js b/test/language/reserved-words/7.6.1-5-13.js deleted file mode 100644 index 2e6d20bd84..0000000000 --- a/test/language/reserved-words/7.6.1-5-13.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-13 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: implements, let, private ----*/ - - var tokenCodes = { - implements: 0, - let: 1, - private: 2 - }; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-14.js b/test/language/reserved-words/7.6.1-5-14.js deleted file mode 100644 index a35df0d2f4..0000000000 --- a/test/language/reserved-words/7.6.1-5-14.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-14 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: public, yield, interface ----*/ - - var tokenCodes = { - public: 0, - yield: 1, - interface: 2 - }; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-15.js b/test/language/reserved-words/7.6.1-5-15.js deleted file mode 100644 index 8cf154fb1b..0000000000 --- a/test/language/reserved-words/7.6.1-5-15.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-15 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: package, protected, static ----*/ - - var tokenCodes = { - package: 0, - protected: 1, - static: 2 - }; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-16.js b/test/language/reserved-words/7.6.1-5-16.js deleted file mode 100644 index c4bb2b1e19..0000000000 --- a/test/language/reserved-words/7.6.1-5-16.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-16 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: undefined, NaN, Infinity ----*/ - - var tokenCodes = { - undefined: 0, - NaN: 1, - Infinity: 2 - }; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-2.js b/test/language/reserved-words/7.6.1-5-2.js deleted file mode 100644 index 6554bfd373..0000000000 --- a/test/language/reserved-words/7.6.1-5-2.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-2 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: break, case, do ----*/ - - var tokenCodes = { - break: 0, - case: 1, - do: 2 - }; - var arr = [ - 'break', - 'case', - 'do' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-3.js b/test/language/reserved-words/7.6.1-5-3.js deleted file mode 100644 index 495c10a5c0..0000000000 --- a/test/language/reserved-words/7.6.1-5-3.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-3 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: instanceof, typeof, else ----*/ - - var tokenCodes = { - instanceof: 0, - typeof: 1, - else: 2 - }; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-4.js b/test/language/reserved-words/7.6.1-5-4.js deleted file mode 100644 index 69c0d1971e..0000000000 --- a/test/language/reserved-words/7.6.1-5-4.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-4 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: new, var, catch ----*/ - - var tokenCodes = { - new: 0, - var: 1, - catch: 2 - }; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-5.js b/test/language/reserved-words/7.6.1-5-5.js deleted file mode 100644 index 8a0bb2e67b..0000000000 --- a/test/language/reserved-words/7.6.1-5-5.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-5 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: finally, return, void ----*/ - - var tokenCodes = { - finally: 0, - return: 1, - void: 2 - }; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-6.js b/test/language/reserved-words/7.6.1-5-6.js deleted file mode 100644 index af89ce7dc5..0000000000 --- a/test/language/reserved-words/7.6.1-5-6.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-6 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: continue, for, switch ----*/ - - var tokenCodes = { - continue: 0, - for: 1, - switch: 2 - }; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-7.js b/test/language/reserved-words/7.6.1-5-7.js deleted file mode 100644 index f941c1fac0..0000000000 --- a/test/language/reserved-words/7.6.1-5-7.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-7 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: while, debugger, function ----*/ - - var tokenCodes = { - while: 0, - debugger: 1, - function: 2 - }; - var arr = [ - 'while' , - 'debugger', - 'function' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-8.js b/test/language/reserved-words/7.6.1-5-8.js deleted file mode 100644 index 8ba8c8514a..0000000000 --- a/test/language/reserved-words/7.6.1-5-8.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-8 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: this, with, default ----*/ - - var tokenCodes = { - this: 0, - with: 1, - default: 2 - }; - var arr = [ - 'this', - 'with', - 'default' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-5-9.js b/test/language/reserved-words/7.6.1-5-9.js deleted file mode 100644 index addcefd695..0000000000 --- a/test/language/reserved-words/7.6.1-5-9.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-5-9 -description: > - Allow reserved words as property names at object initialization, - accessed via indexing: if, throw, delete ----*/ - - var tokenCodes = { - if: 0, - throw: 1, - delete: 2 - }; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-1.js b/test/language/reserved-words/7.6.1-6-1.js deleted file mode 100644 index 561d4bbb0c..0000000000 --- a/test/language/reserved-words/7.6.1-6-1.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-1 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: null, true, false ----*/ - - var tokenCodes = {}; - tokenCodes.null = 0; - tokenCodes.true = 1; - tokenCodes.false = 2; - var arr = [ - 'null', - 'true', - 'false' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-10.js b/test/language/reserved-words/7.6.1-6-10.js deleted file mode 100644 index df67a9d9f9..0000000000 --- a/test/language/reserved-words/7.6.1-6-10.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-10 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: in, try, class ----*/ - - var tokenCodes = {}; - tokenCodes.in = 0; - tokenCodes.try = 1; - tokenCodes.class = 2; - var arr = [ - 'in', - 'try', - 'class' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-11.js b/test/language/reserved-words/7.6.1-6-11.js deleted file mode 100644 index c4bbad191d..0000000000 --- a/test/language/reserved-words/7.6.1-6-11.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-11 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: enum, extends, super ----*/ - - var tokenCodes = {}; - tokenCodes.enum = 0; - tokenCodes.extends = 1; - tokenCodes.super = 2; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-12.js b/test/language/reserved-words/7.6.1-6-12.js deleted file mode 100644 index c5869fc4da..0000000000 --- a/test/language/reserved-words/7.6.1-6-12.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-12 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: const, export, import ----*/ - - var tokenCodes = {}; - tokenCodes.const = 0; - tokenCodes.export = 1; - tokenCodes.import = 2; - var arr = [ - 'const', - 'export', - 'import' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-13.js b/test/language/reserved-words/7.6.1-6-13.js deleted file mode 100644 index 3bab164674..0000000000 --- a/test/language/reserved-words/7.6.1-6-13.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-13 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: implements, let, private ----*/ - - var tokenCodes = {}; - tokenCodes.implements = 0; - tokenCodes.let = 1; - tokenCodes.private = 2; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-14.js b/test/language/reserved-words/7.6.1-6-14.js deleted file mode 100644 index 25ad3c13de..0000000000 --- a/test/language/reserved-words/7.6.1-6-14.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-14 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: public, yield, interface ----*/ - - var tokenCodes = {}; - tokenCodes.public = 0; - tokenCodes.yield = 1; - tokenCodes.interface = 2; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-15.js b/test/language/reserved-words/7.6.1-6-15.js deleted file mode 100644 index 87cc5259f5..0000000000 --- a/test/language/reserved-words/7.6.1-6-15.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-15 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: package, protected, static ----*/ - - var tokenCodes = {}; - tokenCodes.package = 0; - tokenCodes.protected = 1; - tokenCodes.static = 2; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-16.js b/test/language/reserved-words/7.6.1-6-16.js deleted file mode 100644 index a8480ac315..0000000000 --- a/test/language/reserved-words/7.6.1-6-16.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-16 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: undefined, NaN, Infinity ----*/ - - var tokenCodes = {}; - tokenCodes.undefined = 0; - tokenCodes.NaN = 1; - tokenCodes.Infinity = 2; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-2.js b/test/language/reserved-words/7.6.1-6-2.js deleted file mode 100644 index ce2858baba..0000000000 --- a/test/language/reserved-words/7.6.1-6-2.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-2 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: break, case, do ----*/ - - var tokenCodes = {}; - tokenCodes.break = 0; - tokenCodes.case = 1; - tokenCodes.do = 2; - var arr = [ - 'break', - 'case', - 'do' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-3.js b/test/language/reserved-words/7.6.1-6-3.js deleted file mode 100644 index 76da8dc035..0000000000 --- a/test/language/reserved-words/7.6.1-6-3.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-3 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: instanceof, typeof, else ----*/ - - var tokenCodes = {}; - tokenCodes.instanceof = 0; - tokenCodes.typeof = 1; - tokenCodes.else = 2; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-4.js b/test/language/reserved-words/7.6.1-6-4.js deleted file mode 100644 index 1006c2c5bf..0000000000 --- a/test/language/reserved-words/7.6.1-6-4.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-4 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: new, var, catch ----*/ - - var tokenCodes = {}; - tokenCodes.new = 0; - tokenCodes.var = 1; - tokenCodes.catch = 2; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-5.js b/test/language/reserved-words/7.6.1-6-5.js deleted file mode 100644 index c69dee5132..0000000000 --- a/test/language/reserved-words/7.6.1-6-5.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-5 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: finally, return, void ----*/ - - var tokenCodes = {}; - tokenCodes.finally = 0; - tokenCodes.return = 1; - tokenCodes.void = 2; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-6.js b/test/language/reserved-words/7.6.1-6-6.js deleted file mode 100644 index 00ab0eacb7..0000000000 --- a/test/language/reserved-words/7.6.1-6-6.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-6 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: continue, for, switch ----*/ - - var tokenCodes = {}; - tokenCodes.continue = 0; - tokenCodes.for = 1; - tokenCodes.switch = 2; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-7.js b/test/language/reserved-words/7.6.1-6-7.js deleted file mode 100644 index 8ae455dc01..0000000000 --- a/test/language/reserved-words/7.6.1-6-7.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-7 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: while, debugger, function ----*/ - - var tokenCodes = {}; - tokenCodes.while = 0; - tokenCodes.debugger = 1; - tokenCodes.function = 2; - var arr = [ - 'while' , - 'debugger', - 'function' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-8.js b/test/language/reserved-words/7.6.1-6-8.js deleted file mode 100644 index 3fe91178ac..0000000000 --- a/test/language/reserved-words/7.6.1-6-8.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-8 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: this, with, default ----*/ - - var tokenCodes = {}; - tokenCodes.this = 0; - tokenCodes.with = 1; - tokenCodes.default = 2; - var arr = [ - 'this', - 'with', - 'default' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-6-9.js b/test/language/reserved-words/7.6.1-6-9.js deleted file mode 100644 index 4deb78e795..0000000000 --- a/test/language/reserved-words/7.6.1-6-9.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-6-9 -description: > - Allow reserved words as property names by dot operator assignment, - accessed via indexing: if, throw, delete ----*/ - - var tokenCodes = {}; - tokenCodes.if = 0; - tokenCodes.throw = 1; - tokenCodes.delete = 2; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-1.js b/test/language/reserved-words/7.6.1-7-1.js deleted file mode 100644 index 9f133d685a..0000000000 --- a/test/language/reserved-words/7.6.1-7-1.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-1 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: null, true, false ----*/ - - var tokenCodes = {}; - tokenCodes['null'] = 0; - tokenCodes['true'] = 1; - tokenCodes['false'] = 2; - var arr = [ - 'null', - 'true', - 'false' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-10.js b/test/language/reserved-words/7.6.1-7-10.js deleted file mode 100644 index 73a5f5388e..0000000000 --- a/test/language/reserved-words/7.6.1-7-10.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-10 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: in, try, class ----*/ - - var tokenCodes = {}; - tokenCodes['in'] = 0; - tokenCodes['try'] = 1; - tokenCodes['class'] = 2; - var arr = [ - 'in', - 'try', - 'class' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-11.js b/test/language/reserved-words/7.6.1-7-11.js deleted file mode 100644 index 71a9921cad..0000000000 --- a/test/language/reserved-words/7.6.1-7-11.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-11 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: enum, extends, super ----*/ - - var tokenCodes = {}; - tokenCodes['enum'] = 0; - tokenCodes['extends'] = 1; - tokenCodes['super'] = 2; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-12.js b/test/language/reserved-words/7.6.1-7-12.js deleted file mode 100644 index a170a97104..0000000000 --- a/test/language/reserved-words/7.6.1-7-12.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-12 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: const, export, import ----*/ - - var tokenCodes = {}; - tokenCodes['const'] = 0; - tokenCodes['export'] = 1; - tokenCodes['import'] = 2; - var arr = [ - 'const', - 'export', - 'import' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-13.js b/test/language/reserved-words/7.6.1-7-13.js deleted file mode 100644 index 867a4b1ef1..0000000000 --- a/test/language/reserved-words/7.6.1-7-13.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-13 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: implements, let, private ----*/ - - var tokenCodes = {}; - tokenCodes['implements'] = 0; - tokenCodes['let'] = 1; - tokenCodes['private'] = 2; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-14.js b/test/language/reserved-words/7.6.1-7-14.js deleted file mode 100644 index dbde3903df..0000000000 --- a/test/language/reserved-words/7.6.1-7-14.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-14 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: public, yield, interface ----*/ - - var tokenCodes = {}; - tokenCodes['public'] = 0; - tokenCodes['yield'] = 1; - tokenCodes['interface'] = 2; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-15.js b/test/language/reserved-words/7.6.1-7-15.js deleted file mode 100644 index c86bf3c2b6..0000000000 --- a/test/language/reserved-words/7.6.1-7-15.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-15 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: package, protected, static ----*/ - - var tokenCodes = {}; - tokenCodes['package'] = 0; - tokenCodes['protected'] = 1; - tokenCodes['static'] = 2; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-16.js b/test/language/reserved-words/7.6.1-7-16.js deleted file mode 100644 index 610ff78b7c..0000000000 --- a/test/language/reserved-words/7.6.1-7-16.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-16 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: undefined, NaN, Infinity ----*/ - - var tokenCodes = {}; - tokenCodes['undefined'] = 0; - tokenCodes['NaN'] = 1; - tokenCodes['Infinity'] = 2; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-2.js b/test/language/reserved-words/7.6.1-7-2.js deleted file mode 100644 index 5fdb398806..0000000000 --- a/test/language/reserved-words/7.6.1-7-2.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-2 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: break, case, do ----*/ - - var tokenCodes = {}; - tokenCodes['break'] = 0; - tokenCodes['case'] = 1; - tokenCodes['do'] = 2; - var arr = [ - 'break', - 'case', - 'do' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-3.js b/test/language/reserved-words/7.6.1-7-3.js deleted file mode 100644 index 6afbe6030f..0000000000 --- a/test/language/reserved-words/7.6.1-7-3.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-3 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: instanceof, typeof, else ----*/ - - var tokenCodes = {}; - tokenCodes['instanceof'] = 0; - tokenCodes['typeof'] = 1; - tokenCodes['else'] = 2; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-4.js b/test/language/reserved-words/7.6.1-7-4.js deleted file mode 100644 index 55211a2163..0000000000 --- a/test/language/reserved-words/7.6.1-7-4.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-4 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: new, var, catch ----*/ - - var tokenCodes = {}; - tokenCodes['new'] = 0; - tokenCodes['var'] = 1; - tokenCodes['catch'] = 2; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-5.js b/test/language/reserved-words/7.6.1-7-5.js deleted file mode 100644 index abc6344c92..0000000000 --- a/test/language/reserved-words/7.6.1-7-5.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-5 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: finally, return, void ----*/ - - var tokenCodes = {}; - tokenCodes['finally'] = 0; - tokenCodes['return'] = 1; - tokenCodes['void'] = 2; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-6.js b/test/language/reserved-words/7.6.1-7-6.js deleted file mode 100644 index 7a63adc9e9..0000000000 --- a/test/language/reserved-words/7.6.1-7-6.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-6 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: continue, for, switch ----*/ - - var tokenCodes = {}; - tokenCodes['continue'] = 0; - tokenCodes['for'] = 1; - tokenCodes['switch'] = 2; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-7.js b/test/language/reserved-words/7.6.1-7-7.js deleted file mode 100644 index d3b80b67ab..0000000000 --- a/test/language/reserved-words/7.6.1-7-7.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-7 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: while, debugger, function ----*/ - - var tokenCodes = {}; - tokenCodes['while'] = 0; - tokenCodes['debugger'] = 1; - tokenCodes['function'] = 2; - var arr = [ - 'while', - 'debugger', - 'function' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-8.js b/test/language/reserved-words/7.6.1-7-8.js deleted file mode 100644 index a5609cac27..0000000000 --- a/test/language/reserved-words/7.6.1-7-8.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-8 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: this, with, default ----*/ - - var tokenCodes = {}; - tokenCodes['this'] = 0; - tokenCodes['with'] = 1; - tokenCodes['default'] = 2; - var arr = [ - 'this', - 'with', - 'default' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-7-9.js b/test/language/reserved-words/7.6.1-7-9.js deleted file mode 100644 index ddeb26bd7b..0000000000 --- a/test/language/reserved-words/7.6.1-7-9.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-7-9 -description: > - Allow reserved words as property names by index assignment, - accessed via indexing: if, throw, delete ----*/ - - var tokenCodes = {}; - tokenCodes['if'] = 0; - tokenCodes['throw'] = 1; - tokenCodes['delete'] = 2; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-1.js b/test/language/reserved-words/7.6.1-8-1.js deleted file mode 100644 index 9b59ab56a1..0000000000 --- a/test/language/reserved-words/7.6.1-8-1.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-1 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: null, true, false ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set null(value) { - test0 = value; - }, - get null() { - return test0; - }, - set true(value) { - test1 = value; - }, - get true() { - return test1; - }, - set false(value) { - test2 = value; - }, - get false(){ - return test2; - } - }; - var arr = [ - 'null', - 'true', - 'false' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-10.js b/test/language/reserved-words/7.6.1-8-10.js deleted file mode 100644 index f45212e4af..0000000000 --- a/test/language/reserved-words/7.6.1-8-10.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-10 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: in, try, class ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set in(value){ - test0 = value; - }, - get in(){ - return test0; - }, - set try(value){ - test1 = value; - }, - get try(){ - return test1 - }, - set class(value){ - test2 = value; - }, - get class(){ - return test2; - } - }; - var arr = [ - 'in', - 'try', - 'class' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-11.js b/test/language/reserved-words/7.6.1-8-11.js deleted file mode 100644 index e40d5e3c74..0000000000 --- a/test/language/reserved-words/7.6.1-8-11.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-11 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: enum, extends, super ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set enum(value){ - test0 = value; - }, - get enum(){ - return test0; - }, - set extends(value){ - test1 = value; - }, - get extends(){ - return test1; - }, - set super(value){ - test2 = value; - }, - get super(){ - return test2; - } - }; - var arr = [ - 'enum', - 'extends', - 'super' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-12.js b/test/language/reserved-words/7.6.1-8-12.js deleted file mode 100644 index 408f9d7b10..0000000000 --- a/test/language/reserved-words/7.6.1-8-12.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-12 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: const, export, import ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set const(value){ - test0 = value; - }, - get const(){ - return test0; - }, - set export(value){ - test1 = value; - }, - get export(){ - return test1 - }, - set import(value){ - test2 = value; - }, - get import(){ - return test2 - } - }; - var arr = [ - 'const', - 'export', - 'import' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-13.js b/test/language/reserved-words/7.6.1-8-13.js deleted file mode 100644 index 9f96611bd2..0000000000 --- a/test/language/reserved-words/7.6.1-8-13.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-13 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: implements, let, private ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set implements(value){ - test0 = value; - }, - get implements(){ - return test0; - }, - set let(value){ - test1 = value; - }, - get let(){ - return test1 - }, - set private(value){ - test2 = value; - }, - get private(){ - return test2; - } - }; - var arr = [ - 'implements', - 'let', - 'private' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-14.js b/test/language/reserved-words/7.6.1-8-14.js deleted file mode 100644 index 303b43fe17..0000000000 --- a/test/language/reserved-words/7.6.1-8-14.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-14 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: public, yield, interface ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set public(value){ - test0 = value; - }, - get public(){ - return test0; - }, - set yield(value){ - test1 = value; - }, - get yield(){ - return test1; - }, - set interface(value){ - test2 = value; - }, - get interface(){ - return test2; - } - }; - var arr = [ - 'public', - 'yield', - 'interface' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-15.js b/test/language/reserved-words/7.6.1-8-15.js deleted file mode 100644 index 96fad33bda..0000000000 --- a/test/language/reserved-words/7.6.1-8-15.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-15 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: package, protected, static ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set package(value){ - test0 = value; - }, - get package(){ - return test0; - }, - set protected(value){ - test1 = value; - }, - get protected(){ - return test1 - }, - set static(value){ - test2 = value; - }, - get static(){ - return test2; - } - }; - var arr = [ - 'package', - 'protected', - 'static' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-16.js b/test/language/reserved-words/7.6.1-8-16.js deleted file mode 100644 index d83d5ad7ad..0000000000 --- a/test/language/reserved-words/7.6.1-8-16.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-16 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: undefined, NaN, Infinity ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set undefined(value){ - test0 = value; - }, - get undefined(){ - return test0; - }, - set NaN(value){ - test1 = value; - }, - get NaN(){ - return test1; - }, - set Infinity(value){ - test2 = value; - }, - get Infinity(){ - return test2; - } - }; - var arr = [ - 'undefined', - 'NaN', - 'Infinity' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-2.js b/test/language/reserved-words/7.6.1-8-2.js deleted file mode 100644 index fcb2bb984a..0000000000 --- a/test/language/reserved-words/7.6.1-8-2.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-2 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: break, case, do ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set break(value){ - test0 = value; - }, - get break(){ - return test0; - }, - set case(value){ - test1 = value; - }, - get case(){ - return test1; - }, - set do(value){ - test2 = value; - }, - get do(){ - return test2; - } - }; - var arr = [ - 'break', - 'case', - 'do' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-3.js b/test/language/reserved-words/7.6.1-8-3.js deleted file mode 100644 index be9de6d11e..0000000000 --- a/test/language/reserved-words/7.6.1-8-3.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-3 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: instanceof, typeof, else ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set instanceof(value){ - test0 = value; - }, - get instanceof(){ - return test0; - }, - set typeof(value){ - test1 = value; - }, - get typeof(){ - return test1; - }, - set else(value){ - test2 = value; - }, - get else(){ - return test2; - } - }; - var arr = [ - 'instanceof', - 'typeof', - 'else' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-4.js b/test/language/reserved-words/7.6.1-8-4.js deleted file mode 100644 index 1dafc2bd4f..0000000000 --- a/test/language/reserved-words/7.6.1-8-4.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-4 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: new, var, catch ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set new(value){ - test0 = value; - }, - get new(){ - return test0; - }, - set var(value){ - test1 = value; - }, - get var(){ - return test1; - }, - set catch(value){ - test2 = value; - }, - get catch(){ - return test2; - } - }; - var arr = [ - 'new', - 'var', - 'catch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-5.js b/test/language/reserved-words/7.6.1-8-5.js deleted file mode 100644 index 8c559e944d..0000000000 --- a/test/language/reserved-words/7.6.1-8-5.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-5 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: finally, return, void ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set finally(value){ - test0 = value; - }, - get finally(){ - return test0; - }, - set return(value){ - test1 = value; - }, - get return(){ - return test1; - }, - set void(value){ - test2 = value; - }, - get void(){ - return test2; - } - }; - var arr = [ - 'finally', - 'return', - 'void' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-6.js b/test/language/reserved-words/7.6.1-8-6.js deleted file mode 100644 index 8dbd116360..0000000000 --- a/test/language/reserved-words/7.6.1-8-6.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-6 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: continue, for, switch ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set continue(value){ - test0 = value; - }, - get continue(){ - return test0; - }, - set for(value){ - test1 = value; - }, - get for(){ - return test1; - }, - set switch(value){ - test2 = value; - }, - get switch(){ - return test2; - } - }; - var arr = [ - 'continue', - 'for', - 'switch' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-7.js b/test/language/reserved-words/7.6.1-8-7.js deleted file mode 100644 index a352ea5fe4..0000000000 --- a/test/language/reserved-words/7.6.1-8-7.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-7 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: while, debugger, function ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set while(value){ - test0 = value; - }, - get while(){ - return test0 - }, - set debugger(value){ - test1 = value; - }, - get debugger(){ - return test1; - }, - set function(value){ - test2 = value; - }, - get function(){ - return test2; - } - }; - var arr = [ - 'while' , - 'debugger', - 'function' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-8.js b/test/language/reserved-words/7.6.1-8-8.js deleted file mode 100644 index ec0146497d..0000000000 --- a/test/language/reserved-words/7.6.1-8-8.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-8 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: this, with, default ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set this(value){ - test0 = value; - }, - get this(){ - return test0; - }, - set with(value){ - test1 = value; - }, - get with(){ - return test1; - }, - set default(value){ - test2 = value; - }, - get default(){ - return test2; - } - }; - var arr = [ - 'this', - 'with', - 'default' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1-8-9.js b/test/language/reserved-words/7.6.1-8-9.js deleted file mode 100644 index 921f0503ed..0000000000 --- a/test/language/reserved-words/7.6.1-8-9.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 7.6.1-8-9 -description: > - Allow reserved words as property names by set function within an - object, accessed via indexing: if, throw, delete ----*/ - - var test0 = 0, test1 = 1, test2 = 2; - var tokenCodes = { - set if(value){ - test0 = value; - }, - get if(){ - return test0; - }, - set throw(value){ - test1 = value; - }, - get throw(){ - return test1 - }, - set delete(value){ - test2 = value; - }, - get delete(){ - return test2; - } - }; - var arr = [ - 'if', - 'throw', - 'delete' - ]; - for (var i = 0; i < arr.length; i++) { - assert.sameValue(tokenCodes[arr[i]], i, 'tokenCodes[arr[i]]'); - } diff --git a/test/language/reserved-words/7.6.1.2-1gs.js b/test/language/reserved-words/7.6.1.2-1gs.js deleted file mode 100644 index 27752445ce..0000000000 --- a/test/language/reserved-words/7.6.1.2-1gs.js +++ /dev/null @@ -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. - -/*--- -es5id: 7.6.1.2-1gs -description: > - Strict Mode - SyntaxError is thrown when FutureReservedWord - 'implements' occurs in strict mode code -negative: - phase: early - type: SyntaxError -flags: [onlyStrict] ----*/ - -var implements = 1; diff --git a/test/language/reserved-words/S7.6.1_A1.1.js b/test/language/reserved-words/S7.6.1_A1.1.js deleted file mode 100644 index a7452d3dcf..0000000000 --- a/test/language/reserved-words/S7.6.1_A1.1.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "null" token can not be used as identifier -es5id: 7.6.1_A1.1 -description: Checking if execution of "null = 1" fails -negative: - phase: early - type: ReferenceError ----*/ - -null = 1; diff --git a/test/language/reserved-words/S7.6.1_A1.2.js b/test/language/reserved-words/S7.6.1_A1.2.js deleted file mode 100644 index ce5a346855..0000000000 --- a/test/language/reserved-words/S7.6.1_A1.2.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "true" token can not be used as identifier -es5id: 7.6.1_A1.2 -description: Checking if execution of "true=1" fails -negative: - phase: early - type: ReferenceError ----*/ - -true = 1; diff --git a/test/language/reserved-words/S7.6.1_A1.3.js b/test/language/reserved-words/S7.6.1_A1.3.js deleted file mode 100644 index 547858922b..0000000000 --- a/test/language/reserved-words/S7.6.1_A1.3.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "false" token can not be used as identifier -es5id: 7.6.1_A1.3 -description: Checking if execution of "false=1" fails -negative: - phase: early - type: ReferenceError ----*/ - -false = 1; diff --git a/test/language/reserved-words/ident-name-global-property-accessor.js b/test/language/reserved-words/ident-name-global-property-accessor.js new file mode 100644 index 0000000000..dd156dda06 --- /dev/null +++ b/test/language/reserved-words/ident-name-global-property-accessor.js @@ -0,0 +1,39 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-4-16 +description: > + Allow global constant properties as property names by accessor function within an object. +---*/ + +var test; + +var tokenCodes = { + set undefined(value) { test = 'undefined'; }, + get undefined() { return 'undefined'; }, + set NaN(value) { test = 'NaN'; }, + get NaN() { return 'NaN'; }, + set Infinity(value) { test = 'Infinity'; }, + get Infinity() { return 'Infinity'; }, +}; + +var arr = [ + 'undefined', + 'NaN', + 'Infinity', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); + + tokenCodes[propertyName] = 0; + assert.sameValue(test, propertyName, + 'Property "' + propertyName + '" sets correct value'); +} diff --git a/test/language/reserved-words/ident-name-global-property-memberexpr-str.js b/test/language/reserved-words/ident-name-global-property-memberexpr-str.js new file mode 100644 index 0000000000..c2301dae14 --- /dev/null +++ b/test/language/reserved-words/ident-name-global-property-memberexpr-str.js @@ -0,0 +1,30 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-3-16 +description: > + Allow global constant properties as property names by index assignment. +---*/ + +var tokenCodes = {}; + +tokenCodes['undefined'] = 'undefined'; +tokenCodes['NaN'] = 'NaN'; +tokenCodes['Infinity'] = 'Infinity'; + +var arr = [ + 'undefined', + 'NaN', + 'Infinity', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-global-property-memberexpr.js b/test/language/reserved-words/ident-name-global-property-memberexpr.js new file mode 100644 index 0000000000..0348082cdf --- /dev/null +++ b/test/language/reserved-words/ident-name-global-property-memberexpr.js @@ -0,0 +1,30 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-2-16 +description: > + Allow global constant properties as property names by dot operator assignment +---*/ + +var tokenCodes = {}; + +tokenCodes.undefined = 'undefined'; +tokenCodes.NaN = 'NaN'; +tokenCodes.Infinity = 'Infinity'; + +var arr = [ + 'undefined', + 'NaN', + 'Infinity', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-global-property-prop-name.js b/test/language/reserved-words/ident-name-global-property-prop-name.js new file mode 100644 index 0000000000..0fff2aad02 --- /dev/null +++ b/test/language/reserved-words/ident-name-global-property-prop-name.js @@ -0,0 +1,30 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-1-16 +description: > + Allow global constant properties as property names at object initialization. +---*/ + +var tokenCodes = { + undefined: 'undefined', + NaN: 'NaN', + Infinity: 'Infinity', +}; + +var arr = [ + 'undefined', + 'NaN', + 'Infinity' +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-keyword-accessor.js b/test/language/reserved-words/ident-name-keyword-accessor.js new file mode 100644 index 0000000000..817f665444 --- /dev/null +++ b/test/language/reserved-words/ident-name-keyword-accessor.js @@ -0,0 +1,165 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-4-2 +description: > + Allow reserved words as property names by accessor functions within an object. +---*/ + +var test; + +var tokenCodes = { + set await(value) { test = "await"; }, + get await() { return "await"; }, + set break(value) { test = "break"; }, + get break() { return "break"; }, + set case(value) { test = "case"; }, + get case() { return "case"; }, + set catch(value) { test = "catch"; }, + get catch() { return "catch"; }, + set class(value) { test = "class"; }, + get class() { return "class"; }, + set const(value) { test = "const"; }, + get const() { return "const"; }, + set continue(value) { test = "continue"; }, + get continue() { return "continue"; }, + set debugger(value) { test = "debugger"; }, + get debugger() { return "debugger"; }, + set default(value) { test = "default"; }, + get default() { return "default"; }, + set delete(value) { test = "delete"; }, + get delete() { return "delete"; }, + set do(value) { test = "do"; }, + get do() { return "do"; }, + set else(value) { test = "else"; }, + get else() { return "else"; }, + set export(value) { test = "export"; }, + get export() { return "export"; }, + set extends(value) { test = "extends"; }, + get extends() { return "extends"; }, + set finally(value) { test = "finally"; }, + get finally() { return "finally"; }, + set for(value) { test = "for"; }, + get for() { return "for"; }, + set function(value) { test = "function"; }, + get function() { return "function"; }, + set if(value) { test = "if"; }, + get if() { return "if"; }, + set import(value) { test = "import"; }, + get import() { return "import"; }, + set in(value) { test = "in"; }, + get in() { return "in"; }, + set instanceof(value) { test = "instanceof"; }, + get instanceof() { return "instanceof"; }, + set new(value) { test = "new"; }, + get new() { return "new"; }, + set return(value) { test = "return"; }, + get return() { return "return"; }, + set super(value) { test = "super"; }, + get super() { return "super"; }, + set switch(value) { test = "switch"; }, + get switch() { return "switch"; }, + set this(value) { test = "this"; }, + get this() { return "this"; }, + set throw(value) { test = "throw"; }, + get throw() { return "throw"; }, + set try(value) { test = "try"; }, + get try() { return "try"; }, + set typeof(value) { test = "typeof"; }, + get typeof() { return "typeof"; }, + set var(value) { test = "var"; }, + get var() { return "var"; }, + set void(value) { test = "void"; }, + get void() { return "void"; }, + set while(value) { test = "while"; }, + get while() { return "while"; }, + set with(value) { test = "with"; }, + get with() { return "with"; }, + set yield(value) { test = "yield"; }, + get yield() { return "yield"; }, + + set enum(value) { test = "enum"; }, + get enum() { return "enum"; }, + + set implements(value) { test = "implements"; }, + get implements() { return "implements"; }, + set interface(value) { test = "interface"; }, + get interface() { return "interface"; }, + set package(value) { test = "package"; }, + get package() { return "package"; }, + set private(value) { test = "private"; }, + get private() { return "private"; }, + set protected(value) { test = "protected"; }, + get protected() { return "protected"; }, + set public(value) { test = "public"; }, + get public() { return "public"; }, + + set let(value) { test = "let"; }, + get let() { return "let"; }, + set static(value) { test = "static"; }, + get static() { return "static"; }, +}; + +var arr = [ + 'await', + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'export', + 'extends', + 'finally', + 'for', + 'function', + 'if', + 'import', + 'in', + 'instanceof', + 'new', + 'return', + 'super', + 'switch', + 'this', + 'throw', + 'try', + 'typeof', + 'var', + 'void', + 'while', + 'with', + 'yield', + + 'enum', + + 'implements', + 'interface', + 'package', + 'protected', + 'private', + 'public', + + 'let', + 'static', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); + + tokenCodes[propertyName] = 0; + assert.sameValue(test, propertyName, + 'Property "' + propertyName + '" sets correct value'); +} diff --git a/test/language/reserved-words/ident-name-keyword-memberexpr-str.js b/test/language/reserved-words/ident-name-keyword-memberexpr-str.js new file mode 100644 index 0000000000..a6bc1b2b44 --- /dev/null +++ b/test/language/reserved-words/ident-name-keyword-memberexpr-str.js @@ -0,0 +1,117 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-3-2 +description: > + Allow reserved words as property names by index assignment. +---*/ + +var tokenCodes = {}; + +tokenCodes['await'] = 'await'; +tokenCodes['break'] = 'break'; +tokenCodes['case'] = 'case'; +tokenCodes['catch'] = 'catch'; +tokenCodes['class'] = 'class'; +tokenCodes['const'] = 'const'; +tokenCodes['continue'] = 'continue'; +tokenCodes['debugger'] = 'debugger'; +tokenCodes['default'] = 'default'; +tokenCodes['delete'] = 'delete'; +tokenCodes['do'] = 'do'; +tokenCodes['else'] = 'else'; +tokenCodes['export'] = 'export'; +tokenCodes['extends'] = 'extends'; +tokenCodes['finally'] = 'finally'; +tokenCodes['for'] = 'for'; +tokenCodes['function'] = 'function'; +tokenCodes['if'] = 'if'; +tokenCodes['import'] = 'import'; +tokenCodes['in'] = 'in'; +tokenCodes['instanceof'] = 'instanceof'; +tokenCodes['new'] = 'new'; +tokenCodes['return'] = 'return'; +tokenCodes['super'] = 'super'; +tokenCodes['switch'] = 'switch'; +tokenCodes['this'] = 'this'; +tokenCodes['throw'] = 'throw'; +tokenCodes['try'] = 'try'; +tokenCodes['typeof'] = 'typeof'; +tokenCodes['var'] = 'var'; +tokenCodes['void'] = 'void'; +tokenCodes['while'] = 'while'; +tokenCodes['with'] = 'with'; +tokenCodes['yield'] = 'yield'; + +tokenCodes['enum'] = 'enum'; + +tokenCodes['implements'] = 'implements'; +tokenCodes['interface'] = 'interface'; +tokenCodes['package'] = 'package'; +tokenCodes['protected'] = 'protected'; +tokenCodes['private'] = 'private'; +tokenCodes['public'] = 'public'; + +tokenCodes['let'] = 'let'; +tokenCodes['static'] = 'static'; + + +var arr = [ + 'await', + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'export', + 'extends', + 'finally', + 'for', + 'function', + 'if', + 'import', + 'in', + 'instanceof', + 'new', + 'return', + 'super', + 'switch', + 'this', + 'throw', + 'try', + 'typeof', + 'var', + 'void', + 'while', + 'with', + 'yield', + + 'enum', + + 'implements', + 'interface', + 'package', + 'protected', + 'private', + 'public', + + 'let', + 'static', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-keyword-memberexpr.js b/test/language/reserved-words/ident-name-keyword-memberexpr.js new file mode 100644 index 0000000000..f5f6a683a5 --- /dev/null +++ b/test/language/reserved-words/ident-name-keyword-memberexpr.js @@ -0,0 +1,116 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-2-2 +description: > + Allow reserved words as property names by dot operator assignment. +---*/ + +var tokenCodes = {}; + +tokenCodes.await = 'await'; +tokenCodes.break = 'break'; +tokenCodes.case = 'case'; +tokenCodes.catch = 'catch'; +tokenCodes.class = 'class'; +tokenCodes.const = 'const'; +tokenCodes.continue = 'continue'; +tokenCodes.debugger = 'debugger'; +tokenCodes.default = 'default'; +tokenCodes.delete = 'delete'; +tokenCodes.do = 'do'; +tokenCodes.else = 'else'; +tokenCodes.export = 'export'; +tokenCodes.extends = 'extends'; +tokenCodes.finally = 'finally'; +tokenCodes.for = 'for'; +tokenCodes.function = 'function'; +tokenCodes.if = 'if'; +tokenCodes.import = 'import'; +tokenCodes.in = 'in'; +tokenCodes.instanceof = 'instanceof'; +tokenCodes.new = 'new'; +tokenCodes.return = 'return'; +tokenCodes.super = 'super'; +tokenCodes.switch = 'switch'; +tokenCodes.this = 'this'; +tokenCodes.throw = 'throw'; +tokenCodes.try = 'try'; +tokenCodes.typeof = 'typeof'; +tokenCodes.var = 'var'; +tokenCodes.void = 'void'; +tokenCodes.while = 'while'; +tokenCodes.with = 'with'; +tokenCodes.yield = 'yield'; + +tokenCodes.enum = 'enum'; + +tokenCodes.implements = 'implements'; +tokenCodes.interface = 'interface'; +tokenCodes.package = 'package'; +tokenCodes.protected = 'protected'; +tokenCodes.private = 'private'; +tokenCodes.public = 'public'; + +tokenCodes.let = 'let'; +tokenCodes.static = 'static'; + +var arr = [ + 'await', + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'export', + 'extends', + 'finally', + 'for', + 'function', + 'if', + 'import', + 'in', + 'instanceof', + 'new', + 'return', + 'super', + 'switch', + 'this', + 'throw', + 'try', + 'typeof', + 'var', + 'void', + 'while', + 'with', + 'yield', + + 'enum', + + 'implements', + 'interface', + 'package', + 'protected', + 'private', + 'public', + + 'let', + 'static', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-keyword-prop-name.js b/test/language/reserved-words/ident-name-keyword-prop-name.js new file mode 100644 index 0000000000..3b9fd789de --- /dev/null +++ b/test/language/reserved-words/ident-name-keyword-prop-name.js @@ -0,0 +1,116 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-1-2 +description: > + Allow reserved words as property names at object initialization. +---*/ + +var tokenCodes = { + await: 'await', + break: 'break', + case: 'case', + catch: 'catch', + class: 'class', + const: 'const', + continue: 'continue', + debugger: 'debugger', + default: 'default', + delete: 'delete', + do: 'do', + else: 'else', + export: 'export', + extends: 'extends', + finally: 'finally', + for: 'for', + function: 'function', + if: 'if', + import: 'import', + in: 'in', + instanceof: 'instanceof', + new: 'new', + return: 'return', + super: 'super', + switch: 'switch', + this: 'this', + throw: 'throw', + try: 'try', + typeof: 'typeof', + var: 'var', + void: 'void', + while: 'while', + with: 'with', + yield: 'yield', + + enum: 'enum', + + implements: 'implements', + interface: 'interface', + package: 'package', + protected: 'protected', + private: 'private', + public: 'public', + + let: 'let', + static: 'static', +}; + +var arr = [ + 'await', + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'export', + 'extends', + 'finally', + 'for', + 'function', + 'if', + 'import', + 'in', + 'instanceof', + 'new', + 'return', + 'super', + 'switch', + 'this', + 'throw', + 'try', + 'typeof', + 'var', + 'void', + 'while', + 'with', + 'yield', + + 'enum', + + 'implements', + 'interface', + 'package', + 'protected', + 'private', + 'public', + + 'let', + 'static', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-reserved-word-literal-accessor.js b/test/language/reserved-words/ident-name-reserved-word-literal-accessor.js new file mode 100644 index 0000000000..5ff5298a77 --- /dev/null +++ b/test/language/reserved-words/ident-name-reserved-word-literal-accessor.js @@ -0,0 +1,39 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-4-1 +description: > + Allow reserved words as property names by accessor function within an object. +---*/ + +var test; + +var tokenCodes = { + set null(value) { test = 'null'; }, + get null() { return 'null'; }, + set true(value) { test = 'true'; }, + get true() { return 'true'; }, + set false(value) { test = 'false'; }, + get false() { return 'false'; }, +}; + +var arr = [ + 'null', + 'true', + 'false', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); + + tokenCodes[propertyName] = 0; + assert.sameValue(test, propertyName, + 'Property "' + propertyName + '" sets correct value'); +} diff --git a/test/language/reserved-words/ident-name-reserved-word-literal-memberexpr-str.js b/test/language/reserved-words/ident-name-reserved-word-literal-memberexpr-str.js new file mode 100644 index 0000000000..373461b100 --- /dev/null +++ b/test/language/reserved-words/ident-name-reserved-word-literal-memberexpr-str.js @@ -0,0 +1,30 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-3-1 +description: > + Allow reserved words as property names by index assignment. +---*/ + +var tokenCodes = {}; + +tokenCodes['null'] = 'null'; +tokenCodes['true'] = 'true'; +tokenCodes['false'] = 'false'; + +var arr = [ + 'null', + 'true', + 'false', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-reserved-word-literal-memberexpr.js b/test/language/reserved-words/ident-name-reserved-word-literal-memberexpr.js new file mode 100644 index 0000000000..d4d345989d --- /dev/null +++ b/test/language/reserved-words/ident-name-reserved-word-literal-memberexpr.js @@ -0,0 +1,30 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-2-1 +description: > + Allow reserved words as property names by dot operator assignment. +---*/ + +var tokenCodes = {}; + +tokenCodes.null = 'null'; +tokenCodes.true = 'true'; +tokenCodes.false = 'false'; + +var arr = [ + 'null', + 'true', + 'false', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-name-reserved-word-literal-prop-name.js b/test/language/reserved-words/ident-name-reserved-word-literal-prop-name.js new file mode 100644 index 0000000000..6384463f35 --- /dev/null +++ b/test/language/reserved-words/ident-name-reserved-word-literal-prop-name.js @@ -0,0 +1,30 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 7.6.1-1-1 +description: > + Allow reserved words as property names at object initialization. +---*/ + +var tokenCodes = { + null: 'null', + true: 'true', + false: 'false', +}; + +var arr = [ + 'null', + 'true', + 'false', +]; + +for (var i = 0; i < arr.length; ++i) { + var propertyName = arr[i]; + + assert(tokenCodes.hasOwnProperty(propertyName), + 'Property "' + propertyName + '" found'); + + assert.sameValue(tokenCodes[propertyName], propertyName, + 'Property "' + propertyName + '" has correct value'); +} diff --git a/test/language/reserved-words/ident-reference-false-escaped.js b/test/language/reserved-words/ident-reference-false-escaped.js new file mode 100644 index 0000000000..65e06067f5 --- /dev/null +++ b/test/language/reserved-words/ident-reference-false-escaped.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as an identifier reference. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +f\u0061lse = 0; diff --git a/test/language/reserved-words/ident-reference-false.js b/test/language/reserved-words/ident-reference-false.js new file mode 100644 index 0000000000..eb3da278ce --- /dev/null +++ b/test/language/reserved-words/ident-reference-false.js @@ -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 +description: > + `false` is a reserved word and cannot be used as an identifier reference. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +// It's tempting to write `false = 0`, but that'd be a test to validate `false` +// is not a valid simple assignment target, cf. tests in language/expressions/assignment. +// Also see: sec-semantics-static-semantics-isvalidsimpleassignmenttarget +({false}); diff --git a/test/language/reserved-words/ident-reference-null-escaped.js b/test/language/reserved-words/ident-reference-null-escaped.js new file mode 100644 index 0000000000..55f20424b6 --- /dev/null +++ b/test/language/reserved-words/ident-reference-null-escaped.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as an identifier reference. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +nul\u006c = 0; diff --git a/test/language/reserved-words/ident-reference-null.js b/test/language/reserved-words/ident-reference-null.js new file mode 100644 index 0000000000..50102d9695 --- /dev/null +++ b/test/language/reserved-words/ident-reference-null.js @@ -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 +description: > + `false` is a reserved word and cannot be used as an identifier reference. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +// It's tempting to write `null = 0`, but that'd be a test to validate `null` +// is not a valid simple assignment target, cf. tests in language/expressions/assignment. +// Also see: sec-semantics-static-semantics-isvalidsimpleassignmenttarget +({null}); diff --git a/test/language/reserved-words/ident-reference-true-escaped.js b/test/language/reserved-words/ident-reference-true-escaped.js new file mode 100644 index 0000000000..5c74761430 --- /dev/null +++ b/test/language/reserved-words/ident-reference-true-escaped.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as an identifier reference. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +tru\u0065 = 0; diff --git a/test/language/reserved-words/ident-reference-true.js b/test/language/reserved-words/ident-reference-true.js new file mode 100644 index 0000000000..d24cc8a0a5 --- /dev/null +++ b/test/language/reserved-words/ident-reference-true.js @@ -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 +description: > + `false` is a reserved word and cannot be used as an identifier reference. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +// It's tempting to write `true = 0`, but that'd be a test to validate `true` +// is not a valid simple assignment target, cf. tests in language/expressions/assignment. +// Also see: sec-semantics-static-semantics-isvalidsimpleassignmenttarget +({true}); diff --git a/test/language/reserved-words/label-ident-false-escaped.js b/test/language/reserved-words/label-ident-false-escaped.js new file mode 100644 index 0000000000..ff864e3800 --- /dev/null +++ b/test/language/reserved-words/label-ident-false-escaped.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as a label identifier. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +f\u0061lse: ; diff --git a/test/language/reserved-words/label-ident-false.js b/test/language/reserved-words/label-ident-false.js new file mode 100644 index 0000000000..13302f2e3e --- /dev/null +++ b/test/language/reserved-words/label-ident-false.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as a label identifier. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +false: ; diff --git a/test/language/reserved-words/label-ident-null-escaped.js b/test/language/reserved-words/label-ident-null-escaped.js new file mode 100644 index 0000000000..94509c6224 --- /dev/null +++ b/test/language/reserved-words/label-ident-null-escaped.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as a label identifier. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +nul\u006c: ; diff --git a/test/language/reserved-words/label-ident-null.js b/test/language/reserved-words/label-ident-null.js new file mode 100644 index 0000000000..82433ebdfc --- /dev/null +++ b/test/language/reserved-words/label-ident-null.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as a label identifier. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +null: ; diff --git a/test/language/reserved-words/label-ident-true-escaped.js b/test/language/reserved-words/label-ident-true-escaped.js new file mode 100644 index 0000000000..df4cfcbffa --- /dev/null +++ b/test/language/reserved-words/label-ident-true-escaped.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as a label identifier. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +tru\u0065: ; diff --git a/test/language/reserved-words/label-ident-true.js b/test/language/reserved-words/label-ident-true.js new file mode 100644 index 0000000000..30ff9c4579 --- /dev/null +++ b/test/language/reserved-words/label-ident-true.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `false` is a reserved word and cannot be used as a label identifier. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if StringValue of IdentifierName is the same String + value as the StringValue of any ReservedWord except for yield. +negative: + phase: early + type: SyntaxError +---*/ + +true: ; diff --git a/test/language/reserved-words/S7.6.1_A2.js b/test/language/reserved-words/unreserved-words.js similarity index 100% rename from test/language/reserved-words/S7.6.1_A2.js rename to test/language/reserved-words/unreserved-words.js diff --git a/test/language/statements/async-function/await-as-binding-identifier-escaped.js b/test/language/statements/async-function/await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..74c4685f31 --- /dev/null +++ b/test/language/statements/async-function/await-as-binding-identifier-escaped.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async function declaration) +esid: prod-AsyncFunctionDeclaration +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncFunctionDeclaration: + 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". + +---*/ + + +async function fn() { + var \u0061wait; +} diff --git a/test/language/statements/async-function/await-as-binding-identifier.js b/test/language/statements/async-function/await-as-binding-identifier.js new file mode 100644 index 0000000000..9e7a05b7e4 --- /dev/null +++ b/test/language/statements/async-function/await-as-binding-identifier.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async function declaration) +esid: prod-AsyncFunctionDeclaration +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncFunctionDeclaration: + 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". + +---*/ + + +async function fn() { + var await; +} diff --git a/test/language/statements/async-function/await-as-identifier-reference-escaped.js b/test/language/statements/async-function/await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..5f87e7053e --- /dev/null +++ b/test/language/statements/async-function/await-as-identifier-reference-escaped.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async function declaration) +esid: prod-AsyncFunctionDeclaration +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncFunctionDeclaration: + 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". + +---*/ + + +async function fn() { + void \u0061wait; +} diff --git a/test/language/statements/async-function/await-as-identifier-reference.js b/test/language/statements/async-function/await-as-identifier-reference.js new file mode 100644 index 0000000000..6e79c06ae1 --- /dev/null +++ b/test/language/statements/async-function/await-as-identifier-reference.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async function declaration) +esid: prod-AsyncFunctionDeclaration +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncFunctionDeclaration: + 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". + +---*/ + + +async function fn() { + void await; +} diff --git a/test/language/statements/async-function/await-as-label-identifier-escaped.js b/test/language/statements/async-function/await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..8e9239aa7a --- /dev/null +++ b/test/language/statements/async-function/await-as-label-identifier-escaped.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async function declaration) +esid: prod-AsyncFunctionDeclaration +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncFunctionDeclaration: + 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". + +---*/ + + +async function fn() { + \u0061wait: ; +} diff --git a/test/language/statements/async-function/await-as-label-identifier.js b/test/language/statements/async-function/await-as-label-identifier.js new file mode 100644 index 0000000000..d0ac4c5363 --- /dev/null +++ b/test/language/statements/async-function/await-as-label-identifier.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async function declaration) +esid: prod-AsyncFunctionDeclaration +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Function Definitions + + AsyncFunctionDeclaration: + 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". + +---*/ + + +async function fn() { + await: ; +} diff --git a/test/language/statements/async-function/escaped-async.js b/test/language/statements/async-function/escaped-async.js new file mode 100644 index 0000000000..32e098029e --- /dev/null +++ b/test/language/statements/async-function/escaped-async.js @@ -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 function f(){} diff --git a/test/language/statements/async-generator/await-as-binding-identifier-escaped.js b/test/language/statements/async-generator/await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..2c1ed63c93 --- /dev/null +++ b/test/language/statements/async-generator/await-as-binding-identifier-escaped.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + var \u0061wait; +} diff --git a/test/language/statements/async-generator/await-as-binding-identifier.js b/test/language/statements/async-generator/await-as-binding-identifier.js new file mode 100644 index 0000000000..4a6af90384 --- /dev/null +++ b/test/language/statements/async-generator/await-as-binding-identifier.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + var await; +} diff --git a/test/language/statements/async-generator/await-as-identifier-reference-escaped.js b/test/language/statements/async-generator/await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..afe771cc9c --- /dev/null +++ b/test/language/statements/async-generator/await-as-identifier-reference-escaped.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + void \u0061wait; +} diff --git a/test/language/statements/async-generator/await-as-identifier-reference.js b/test/language/statements/async-generator/await-as-identifier-reference.js new file mode 100644 index 0000000000..db2a97569a --- /dev/null +++ b/test/language/statements/async-generator/await-as-identifier-reference.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + void await; +} diff --git a/test/language/statements/async-generator/await-as-label-identifier-escaped.js b/test/language/statements/async-generator/await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..9f5b2658e7 --- /dev/null +++ b/test/language/statements/async-generator/await-as-label-identifier-escaped.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + \u0061wait: ; +} diff --git a/test/language/statements/async-generator/await-as-label-identifier.js b/test/language/statements/async-generator/await-as-label-identifier.js new file mode 100644 index 0000000000..f2eda8967e --- /dev/null +++ b/test/language/statements/async-generator/await-as-label-identifier.js @@ -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-declaration.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + await: ; +} diff --git a/test/language/statements/async-generator/escaped-async.js b/test/language/statements/async-generator/escaped-async.js new file mode 100644 index 0000000000..625bcf3741 --- /dev/null +++ b/test/language/statements/async-generator/escaped-async.js @@ -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] +---*/ + +\u0061sync function* f(){} diff --git a/test/language/statements/async-generator/yield-as-binding-identifier-escaped.js b/test/language/statements/async-generator/yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..ed14c504c2 --- /dev/null +++ b/test/language/statements/async-generator/yield-as-binding-identifier-escaped.js @@ -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-declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + var yi\u0065ld; +} diff --git a/test/language/statements/async-generator/yield-as-binding-identifier.js b/test/language/statements/async-generator/yield-as-binding-identifier.js new file mode 100644 index 0000000000..0629a150f9 --- /dev/null +++ b/test/language/statements/async-generator/yield-as-binding-identifier.js @@ -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-declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + var yield; +} diff --git a/test/language/statements/async-generator/yield-as-identifier-reference-escaped.js b/test/language/statements/async-generator/yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..a312035308 --- /dev/null +++ b/test/language/statements/async-generator/yield-as-identifier-reference-escaped.js @@ -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-declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + void yi\u0065ld; +} diff --git a/test/language/statements/async-generator/yield-as-identifier-reference.js b/test/language/statements/async-generator/yield-as-identifier-reference.js new file mode 100644 index 0000000000..1dd814db89 --- /dev/null +++ b/test/language/statements/async-generator/yield-as-identifier-reference.js @@ -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-declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + void yield; +} diff --git a/test/language/statements/async-generator/yield-as-label-identifier-escaped.js b/test/language/statements/async-generator/yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..a5cdf45c6e --- /dev/null +++ b/test/language/statements/async-generator/yield-as-label-identifier-escaped.js @@ -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-declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + yi\u0065ld: ; +} diff --git a/test/language/statements/async-generator/yield-as-label-identifier.js b/test/language/statements/async-generator/yield-as-label-identifier.js new file mode 100644 index 0000000000..4ad7ddadbf --- /dev/null +++ b/test/language/statements/async-generator/yield-as-label-identifier.js @@ -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-declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator Function declaration) +esid: prod-AsyncGeneratorDeclaration +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Async Generator Function Definitions + + AsyncGeneratorDeclaration: + 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". + +---*/ + + +async function *gen() { + yield: ; +} diff --git a/test/language/statements/class/async-gen-meth-escaped-async.js b/test/language/statements/class/async-gen-meth-escaped-async.js new file mode 100644 index 0000000000..bd9c54ef91 --- /dev/null +++ b/test/language/statements/class/async-gen-meth-escaped-async.js @@ -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. + +/*--- +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] +---*/ + +class C { + \u0061sync* m(){} +}; diff --git a/test/language/statements/class/async-gen-method-await-as-binding-identifier-escaped.js b/test/language/statements/class/async-gen-method-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..e598f160bf --- /dev/null +++ b/test/language/statements/class/async-gen-method-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async *gen() { + var \u0061wait; +}} diff --git a/test/language/statements/class/async-gen-method-await-as-binding-identifier.js b/test/language/statements/class/async-gen-method-await-as-binding-identifier.js new file mode 100644 index 0000000000..42eddb1a5c --- /dev/null +++ b/test/language/statements/class/async-gen-method-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async *gen() { + var await; +}} diff --git a/test/language/statements/class/async-gen-method-await-as-identifier-reference-escaped.js b/test/language/statements/class/async-gen-method-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..bb0a4dd6bb --- /dev/null +++ b/test/language/statements/class/async-gen-method-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async *gen() { + void \u0061wait; +}} diff --git a/test/language/statements/class/async-gen-method-await-as-identifier-reference.js b/test/language/statements/class/async-gen-method-await-as-identifier-reference.js new file mode 100644 index 0000000000..1db50d1515 --- /dev/null +++ b/test/language/statements/class/async-gen-method-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async *gen() { + void await; +}} diff --git a/test/language/statements/class/async-gen-method-await-as-label-identifier-escaped.js b/test/language/statements/class/async-gen-method-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..a2791ce5cf --- /dev/null +++ b/test/language/statements/class/async-gen-method-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async *gen() { + \u0061wait: ; +}} diff --git a/test/language/statements/class/async-gen-method-await-as-label-identifier.js b/test/language/statements/class/async-gen-method-await-as-label-identifier.js new file mode 100644 index 0000000000..3ffbbbaa30 --- /dev/null +++ b/test/language/statements/class/async-gen-method-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async *gen() { + await: ; +}} diff --git a/test/language/statements/class/async-gen-method-static-await-as-binding-identifier-escaped.js b/test/language/statements/class/async-gen-method-static-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..f1e4921c2c --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async *gen() { + var \u0061wait; +}} diff --git a/test/language/statements/class/async-gen-method-static-await-as-binding-identifier.js b/test/language/statements/class/async-gen-method-static-await-as-binding-identifier.js new file mode 100644 index 0000000000..0f5e4f71da --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-binding-identifier.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async *gen() { + var await; +}} diff --git a/test/language/statements/class/async-gen-method-static-await-as-identifier-reference-escaped.js b/test/language/statements/class/async-gen-method-static-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..7d06744382 --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async *gen() { + void \u0061wait; +}} diff --git a/test/language/statements/class/async-gen-method-static-await-as-identifier-reference.js b/test/language/statements/class/async-gen-method-static-await-as-identifier-reference.js new file mode 100644 index 0000000000..c7215a4f17 --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-identifier-reference.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async *gen() { + void await; +}} diff --git a/test/language/statements/class/async-gen-method-static-await-as-label-identifier-escaped.js b/test/language/statements/class/async-gen-method-static-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..bfc87d739b --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async *gen() { + \u0061wait: ; +}} diff --git a/test/language/statements/class/async-gen-method-static-await-as-label-identifier.js b/test/language/statements/class/async-gen-method-static-await-as-label-identifier.js new file mode 100644 index 0000000000..61073be1a6 --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/await-as-label-identifier.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async *gen() { + await: ; +}} diff --git a/test/language/statements/class/async-gen-method-static-yield-as-binding-identifier-escaped.js b/test/language/statements/class/async-gen-method-static-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..00bf839f00 --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-yield-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { static async *gen() { + var yi\u0065ld; +}} diff --git a/test/language/statements/class/async-gen-method-static-yield-as-binding-identifier.js b/test/language/statements/class/async-gen-method-static-yield-as-binding-identifier.js new file mode 100644 index 0000000000..74af046d68 --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-yield-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { static async *gen() { + var yield; +}} diff --git a/test/language/statements/class/async-gen-method-static-yield-as-identifier-reference-escaped.js b/test/language/statements/class/async-gen-method-static-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..f9a4ba29cd --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-yield-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { static async *gen() { + void yi\u0065ld; +}} diff --git a/test/language/statements/class/async-gen-method-static-yield-as-identifier-reference.js b/test/language/statements/class/async-gen-method-static-yield-as-identifier-reference.js new file mode 100644 index 0000000000..15e62ca71b --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-yield-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { static async *gen() { + void yield; +}} diff --git a/test/language/statements/class/async-gen-method-static-yield-as-label-identifier-escaped.js b/test/language/statements/class/async-gen-method-static-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..f01b5c42bd --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-yield-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { static async *gen() { + yi\u0065ld: ; +}} diff --git a/test/language/statements/class/async-gen-method-static-yield-as-label-identifier.js b/test/language/statements/class/async-gen-method-static-yield-as-label-identifier.js new file mode 100644 index 0000000000..58fad7a3e6 --- /dev/null +++ b/test/language/statements/class/async-gen-method-static-yield-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier.case +// - src/async-generators/syntax/async-class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { static async *gen() { + yield: ; +}} diff --git a/test/language/statements/class/async-gen-method-yield-as-binding-identifier-escaped.js b/test/language/statements/class/async-gen-method-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..3909c9d142 --- /dev/null +++ b/test/language/statements/class/async-gen-method-yield-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { async *gen() { + var yi\u0065ld; +}} diff --git a/test/language/statements/class/async-gen-method-yield-as-binding-identifier.js b/test/language/statements/class/async-gen-method-yield-as-binding-identifier.js new file mode 100644 index 0000000000..c66c3d39d3 --- /dev/null +++ b/test/language/statements/class/async-gen-method-yield-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-binding-identifier.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { async *gen() { + var yield; +}} diff --git a/test/language/statements/class/async-gen-method-yield-as-identifier-reference-escaped.js b/test/language/statements/class/async-gen-method-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..d1edabae37 --- /dev/null +++ b/test/language/statements/class/async-gen-method-yield-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference-escaped.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { async *gen() { + void yi\u0065ld; +}} diff --git a/test/language/statements/class/async-gen-method-yield-as-identifier-reference.js b/test/language/statements/class/async-gen-method-yield-as-identifier-reference.js new file mode 100644 index 0000000000..df4677f978 --- /dev/null +++ b/test/language/statements/class/async-gen-method-yield-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-identifier-reference.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { async *gen() { + void yield; +}} diff --git a/test/language/statements/class/async-gen-method-yield-as-label-identifier-escaped.js b/test/language/statements/class/async-gen-method-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..6bc3b5c601 --- /dev/null +++ b/test/language/statements/class/async-gen-method-yield-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier-escaped.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { async *gen() { + yi\u0065ld: ; +}} diff --git a/test/language/statements/class/async-gen-method-yield-as-label-identifier.js b/test/language/statements/class/async-gen-method-yield-as-label-identifier.js new file mode 100644 index 0000000000..43e1542c4d --- /dev/null +++ b/test/language/statements/class/async-gen-method-yield-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-generators/yield-as-label-identifier.case +// - src/async-generators/syntax/async-class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async Generator method as a ClassDeclaration element) +esid: prod-AsyncGeneratorMethod +features: [async-iteration] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncGeneratorMethod + + Async Generator Function Definitions + + AsyncGeneratorMethod : + async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + + +class C { async *gen() { + yield: ; +}} diff --git a/test/language/statements/class/async-meth-escaped-async.js b/test/language/statements/class/async-meth-escaped-async.js new file mode 100644 index 0000000000..e22dcbfb7b --- /dev/null +++ b/test/language/statements/class/async-meth-escaped-async.js @@ -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. + +/*--- +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] +---*/ + +class C { + \u0061sync m(){} +}; diff --git a/test/language/statements/class/async-method-await-as-binding-identifier-escaped.js b/test/language/statements/class/async-method-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..82fe97a4de --- /dev/null +++ b/test/language/statements/class/async-method-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier-escaped.case +// - src/async-functions/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async method() { + var \u0061wait; +}} diff --git a/test/language/statements/class/async-method-await-as-binding-identifier.js b/test/language/statements/class/async-method-await-as-binding-identifier.js new file mode 100644 index 0000000000..cec3fe4e56 --- /dev/null +++ b/test/language/statements/class/async-method-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier.case +// - src/async-functions/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async method() { + var await; +}} diff --git a/test/language/statements/class/async-method-await-as-identifier-reference-escaped.js b/test/language/statements/class/async-method-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..0a7e3038dd --- /dev/null +++ b/test/language/statements/class/async-method-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference-escaped.case +// - src/async-functions/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async method() { + void \u0061wait; +}} diff --git a/test/language/statements/class/async-method-await-as-identifier-reference.js b/test/language/statements/class/async-method-await-as-identifier-reference.js new file mode 100644 index 0000000000..673df6aea7 --- /dev/null +++ b/test/language/statements/class/async-method-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference.case +// - src/async-functions/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async method() { + void await; +}} diff --git a/test/language/statements/class/async-method-await-as-label-identifier-escaped.js b/test/language/statements/class/async-method-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..eacea2bfff --- /dev/null +++ b/test/language/statements/class/async-method-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier-escaped.case +// - src/async-functions/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async method() { + \u0061wait: ; +}} diff --git a/test/language/statements/class/async-method-await-as-label-identifier.js b/test/language/statements/class/async-method-await-as-label-identifier.js new file mode 100644 index 0000000000..10c9f48992 --- /dev/null +++ b/test/language/statements/class/async-method-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier.case +// - src/async-functions/syntax/async-class-decl-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { async method() { + await: ; +}} diff --git a/test/language/statements/class/async-method-static-await-as-binding-identifier-escaped.js b/test/language/statements/class/async-method-static-await-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..475b182660 --- /dev/null +++ b/test/language/statements/class/async-method-static-await-as-binding-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier-escaped.case +// - src/async-functions/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async method() { + var \u0061wait; +}} diff --git a/test/language/statements/class/async-method-static-await-as-binding-identifier.js b/test/language/statements/class/async-method-static-await-as-binding-identifier.js new file mode 100644 index 0000000000..86b620d2e6 --- /dev/null +++ b/test/language/statements/class/async-method-static-await-as-binding-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-binding-identifier.case +// - src/async-functions/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async method() { + var await; +}} diff --git a/test/language/statements/class/async-method-static-await-as-identifier-reference-escaped.js b/test/language/statements/class/async-method-static-await-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..b1e7d923c1 --- /dev/null +++ b/test/language/statements/class/async-method-static-await-as-identifier-reference-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference-escaped.case +// - src/async-functions/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async method() { + void \u0061wait; +}} diff --git a/test/language/statements/class/async-method-static-await-as-identifier-reference.js b/test/language/statements/class/async-method-static-await-as-identifier-reference.js new file mode 100644 index 0000000000..13760e2378 --- /dev/null +++ b/test/language/statements/class/async-method-static-await-as-identifier-reference.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-identifier-reference.case +// - src/async-functions/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async method() { + void await; +}} diff --git a/test/language/statements/class/async-method-static-await-as-label-identifier-escaped.js b/test/language/statements/class/async-method-static-await-as-label-identifier-escaped.js new file mode 100644 index 0000000000..f8c08a4b15 --- /dev/null +++ b/test/language/statements/class/async-method-static-await-as-label-identifier-escaped.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier-escaped.case +// - src/async-functions/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async method() { + \u0061wait: ; +}} diff --git a/test/language/statements/class/async-method-static-await-as-label-identifier.js b/test/language/statements/class/async-method-static-await-as-label-identifier.js new file mode 100644 index 0000000000..85f00de3c6 --- /dev/null +++ b/test/language/statements/class/async-method-static-await-as-label-identifier.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/async-functions/await-as-label-identifier.case +// - src/async-functions/syntax/async-class-decl-static-method.template +/*--- +description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static async method as a ClassDeclaration element) +esid: prod-AsyncMethod +features: [async-functions] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + AsyncMethod + + Async Function Definitions + + AsyncMethod : + async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } + + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Await] parameter and + StringValue of Identifier is "await". + +---*/ + + +class C { static async method() { + await: ; +}} diff --git a/test/language/statements/class/definition/methods-gen-yield-as-binding-identifier.js b/test/language/statements/class/definition/methods-gen-yield-as-binding-identifier.js deleted file mode 100644 index ff2f57abb2..0000000000 --- a/test/language/statements/class/definition/methods-gen-yield-as-binding-identifier.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a binding identifier. - features: [generators] - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ - -class A { - *g() { - yield = 1; - } -} diff --git a/test/language/statements/class/definition/methods-gen-yield-as-label.js b/test/language/statements/class/definition/methods-gen-yield-as-label.js deleted file mode 100644 index 6b9da37724..0000000000 --- a/test/language/statements/class/definition/methods-gen-yield-as-label.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a label. - features: [generators] - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ - -class A { - *g() { - yield: 1; - } -} diff --git a/test/language/statements/class/gen-method-static-yield-as-binding-identifier-escaped.js b/test/language/statements/class/gen-method-static-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..0c0bcf4652 --- /dev/null +++ b/test/language/statements/class/gen-method-static-yield-as-binding-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C {static *gen() { + var yi\u0065ld; +}} diff --git a/test/language/statements/class/gen-method-static-yield-as-binding-identifier.js b/test/language/statements/class/gen-method-static-yield-as-binding-identifier.js new file mode 100644 index 0000000000..3ad26c4192 --- /dev/null +++ b/test/language/statements/class/gen-method-static-yield-as-binding-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Static generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C {static *gen() { + var yield; +}} diff --git a/test/language/statements/class/gen-method-static-yield-as-identifier-reference-escaped.js b/test/language/statements/class/gen-method-static-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..b8efecd9bf --- /dev/null +++ b/test/language/statements/class/gen-method-static-yield-as-identifier-reference-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C {static *gen() { + void yi\u0065ld; +}} diff --git a/test/language/statements/class/gen-method-static-yield-as-identifier-reference.js b/test/language/statements/class/gen-method-static-yield-as-identifier-reference.js new file mode 100644 index 0000000000..1ca9958a87 --- /dev/null +++ b/test/language/statements/class/gen-method-static-yield-as-identifier-reference.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Static generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C {static *gen() { + void yield; +}} diff --git a/test/language/statements/class/gen-method-static-yield-as-label-identifier-escaped.js b/test/language/statements/class/gen-method-static-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..0803753fcd --- /dev/null +++ b/test/language/statements/class/gen-method-static-yield-as-label-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C {static *gen() { + yi\u0065ld: ; +}} diff --git a/test/language/statements/class/gen-method-static-yield-as-label-identifier.js b/test/language/statements/class/gen-method-static-yield-as-label-identifier.js new file mode 100644 index 0000000000..332dfe8ffa --- /dev/null +++ b/test/language/statements/class/gen-method-static-yield-as-label-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/class-decl-static-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Static generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + static MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C {static *gen() { + yield: ; +}} diff --git a/test/language/statements/class/gen-method-yield-as-binding-identifier-escaped.js b/test/language/statements/class/gen-method-yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..26bebf430f --- /dev/null +++ b/test/language/statements/class/gen-method-yield-as-binding-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C { *gen() { + var yi\u0065ld; +}} diff --git a/test/language/statements/class/gen-method-yield-as-binding-identifier.js b/test/language/statements/class/gen-method-yield-as-binding-identifier.js new file mode 100644 index 0000000000..01da0e7eec --- /dev/null +++ b/test/language/statements/class/gen-method-yield-as-binding-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C { *gen() { + var yield; +}} diff --git a/test/language/statements/class/gen-method-yield-as-identifier-reference-escaped.js b/test/language/statements/class/gen-method-yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..517a0127a6 --- /dev/null +++ b/test/language/statements/class/gen-method-yield-as-identifier-reference-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C { *gen() { + void yi\u0065ld; +}} diff --git a/test/language/statements/class/gen-method-yield-as-identifier-reference.js b/test/language/statements/class/gen-method-yield-as-identifier-reference.js new file mode 100644 index 0000000000..436d7bc26b --- /dev/null +++ b/test/language/statements/class/gen-method-yield-as-identifier-reference.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C { *gen() { + void yield; +}} diff --git a/test/language/statements/class/gen-method-yield-as-label-identifier-escaped.js b/test/language/statements/class/gen-method-yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..14c1b14496 --- /dev/null +++ b/test/language/statements/class/gen-method-yield-as-label-identifier-escaped.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C { *gen() { + yi\u0065ld: ; +}} diff --git a/test/language/statements/class/gen-method-yield-as-label-identifier.js b/test/language/statements/class/gen-method-yield-as-label-identifier.js new file mode 100644 index 0000000000..877a20b702 --- /dev/null +++ b/test/language/statements/class/gen-method-yield-as-label-identifier.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/class-decl-method.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method as a ClassDeclaration element) +esid: prod-GeneratorMethod +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + ClassElement : + MethodDefinition + + MethodDefinition : + GeneratorMethod + + 14.4 Generator Function Definitions + + GeneratorMethod : + * PropertyName ( UniqueFormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +class C { *gen() { + yield: ; +}} diff --git a/test/language/statements/class/syntax/escaped-static.js b/test/language/statements/class/syntax/escaped-static.js new file mode 100644 index 0000000000..d5be3cf8b1 --- /dev/null +++ b/test/language/statements/class/syntax/escaped-static.js @@ -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 `static` 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 +---*/ + +class C { + st\u0061tic m() {} +} diff --git a/test/language/statements/do-while/decl-async-fun.js b/test/language/statements/do-while/decl-async-fun.js new file mode 100644 index 0000000000..adcd9046b6 --- /dev/null +++ b/test/language/statements/do-while/decl-async-fun.js @@ -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. + +/*--- +esid: sec-do-while-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +do async function f() {} while (false) diff --git a/test/language/statements/do-while/decl-async-gen.js b/test/language/statements/do-while/decl-async-gen.js new file mode 100644 index 0000000000..668bbe16cf --- /dev/null +++ b/test/language/statements/do-while/decl-async-gen.js @@ -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. + +/*--- +esid: sec-do-while-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +do async function* g() {} while (false) diff --git a/test/language/statements/do-while/let-array-with-newline.js b/test/language/statements/do-while/let-array-with-newline.js new file mode 100644 index 0000000000..faf318f0e1 --- /dev/null +++ b/test/language/statements/do-while/let-array-with-newline.js @@ -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. + +/*--- +esid: sec-do-while-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +do let +[x] = 0 +while (false); diff --git a/test/language/statements/for-await-of/escaped-of.js b/test/language/statements/for-await-of/escaped-of.js new file mode 100644 index 0000000000..f58ce63a0d --- /dev/null +++ b/test/language/statements/for-await-of/escaped-of.js @@ -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. + +/*--- +esid: sec-grammar-notation +description: > + The `of` 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] +---*/ + +async function* f() { + for await (var x o\u0066 []) ; +} diff --git a/test/language/statements/for-await-of/let-array-with-newline.js b/test/language/statements/for-await-of/let-array-with-newline.js new file mode 100644 index 0000000000..08b68c1b2d --- /dev/null +++ b/test/language/statements/for-await-of/let-array-with-newline.js @@ -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-for-in-and-for-of-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +features: [async-iteration] +---*/ + +async function* f() { + for await (var x of []) let + [a] = 0; +} diff --git a/test/language/statements/for-await-of/let-block-with-newline.js b/test/language/statements/for-await-of/let-block-with-newline.js new file mode 100644 index 0000000000..ba5a9ee3db --- /dev/null +++ b/test/language/statements/for-await-of/let-block-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +features: [async-iteration] +---*/ + +async function* f() { + for await (var x of []) let // ASI + {} +} diff --git a/test/language/statements/for-await-of/let-identifier-with-newline.js b/test/language/statements/for-await-of/let-identifier-with-newline.js new file mode 100644 index 0000000000..87a3cb38d0 --- /dev/null +++ b/test/language/statements/for-await-of/let-identifier-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +features: [async-iteration] +---*/ + +async function* f() { + for await (var x of []) let // ASI + x = 1; +} diff --git a/test/language/statements/for-in/decl-async-fun.js b/test/language/statements/for-in/decl-async-fun.js new file mode 100644 index 0000000000..53dfffed1f --- /dev/null +++ b/test/language/statements/for-in/decl-async-fun.js @@ -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. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +for (var x in {}) async function f() {} diff --git a/test/language/statements/for-in/decl-async-gen.js b/test/language/statements/for-in/decl-async-gen.js new file mode 100644 index 0000000000..30f85d929c --- /dev/null +++ b/test/language/statements/for-in/decl-async-gen.js @@ -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. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +for (var x in {}) async function* g() {} diff --git a/test/language/statements/for-in/let-array-with-newline.js b/test/language/statements/for-in/let-array-with-newline.js new file mode 100644 index 0000000000..7acf629235 --- /dev/null +++ b/test/language/statements/for-in/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +for (var x in null) let +[a] = 0; diff --git a/test/language/statements/for-in/let-block-with-newline.js b/test/language/statements/for-in/let-block-with-newline.js new file mode 100644 index 0000000000..05fe78c593 --- /dev/null +++ b/test/language/statements/for-in/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x in null) let // ASI +{} diff --git a/test/language/statements/for-in/let-identifier-with-newline.js b/test/language/statements/for-in/let-identifier-with-newline.js new file mode 100644 index 0000000000..b3f148230c --- /dev/null +++ b/test/language/statements/for-in/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x in null) let // ASI +x = 1; diff --git a/test/language/statements/for-of/decl-async-fun.js b/test/language/statements/for-of/decl-async-fun.js new file mode 100644 index 0000000000..031c17da03 --- /dev/null +++ b/test/language/statements/for-of/decl-async-fun.js @@ -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. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +for (var x of []) async function f() {} diff --git a/test/language/statements/for-of/decl-async-gen.js b/test/language/statements/for-of/decl-async-gen.js new file mode 100644 index 0000000000..282f161dcc --- /dev/null +++ b/test/language/statements/for-of/decl-async-gen.js @@ -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. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +for (var x of []) async function* g() {} diff --git a/test/language/statements/for-of/escaped-of.js b/test/language/statements/for-of/escaped-of.js new file mode 100644 index 0000000000..ca47168b5f --- /dev/null +++ b/test/language/statements/for-of/escaped-of.js @@ -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-grammar-notation +description: > + The `of` 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 +---*/ + +for (var x o\u0066 []) ; diff --git a/test/language/statements/for-of/let-array-with-newline.js b/test/language/statements/for-of/let-array-with-newline.js new file mode 100644 index 0000000000..4d19ec3fa3 --- /dev/null +++ b/test/language/statements/for-of/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +for (var x of []) let +[a] = 0; diff --git a/test/language/statements/for-of/let-block-with-newline.js b/test/language/statements/for-of/let-block-with-newline.js new file mode 100644 index 0000000000..1f19ec14bf --- /dev/null +++ b/test/language/statements/for-of/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x of []) let // ASI +{} diff --git a/test/language/statements/for-of/let-identifier-with-newline.js b/test/language/statements/for-of/let-identifier-with-newline.js new file mode 100644 index 0000000000..63e088c1c3 --- /dev/null +++ b/test/language/statements/for-of/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-in-and-for-of-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (var x of []) let // ASI +x = 1; diff --git a/test/language/statements/for/decl-async-fun.js b/test/language/statements/for/decl-async-fun.js new file mode 100644 index 0000000000..c9421e52f4 --- /dev/null +++ b/test/language/statements/for/decl-async-fun.js @@ -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. + +/*--- +esid: sec-for-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +for ( ; false; ) async function f() {} diff --git a/test/language/statements/for/decl-async-gen.js b/test/language/statements/for/decl-async-gen.js new file mode 100644 index 0000000000..61ef718d2a --- /dev/null +++ b/test/language/statements/for/decl-async-gen.js @@ -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. + +/*--- +esid: sec-for-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +for ( ; false; ) async function* g() {} diff --git a/test/language/statements/for/let-array-with-newline.js b/test/language/statements/for/let-array-with-newline.js new file mode 100644 index 0000000000..da29097908 --- /dev/null +++ b/test/language/statements/for/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +for (; false; ) let +[a] = 0; diff --git a/test/language/statements/for/let-block-with-newline.js b/test/language/statements/for/let-block-with-newline.js new file mode 100644 index 0000000000..681f0b34a6 --- /dev/null +++ b/test/language/statements/for/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (; false; ) let // ASI +{} diff --git a/test/language/statements/for/let-identifier-with-newline.js b/test/language/statements/for/let-identifier-with-newline.js new file mode 100644 index 0000000000..ba18fac90d --- /dev/null +++ b/test/language/statements/for/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-for-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +for (; false; ) let // ASI +x = 1; diff --git a/test/language/statements/generators/yield-as-binding-identifier-escaped.js b/test/language/statements/generators/yield-as-binding-identifier-escaped.js new file mode 100644 index 0000000000..e1688b4418 --- /dev/null +++ b/test/language/statements/generators/yield-as-binding-identifier-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier-escaped.case +// - src/generators/syntax/declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator Function declaration) +esid: prod-GeneratorDeclaration +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorDeclaration : + function * BindingIdentifier ( FormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +function *gen() { + var yi\u0065ld; +} diff --git a/test/language/statements/generators/yield-as-binding-identifier.js b/test/language/statements/generators/yield-as-binding-identifier.js index e450378779..9b96f8de86 100644 --- a/test/language/statements/generators/yield-as-binding-identifier.js +++ b/test/language/statements/generators/yield-as-binding-identifier.js @@ -1,21 +1,26 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-binding-identifier.case +// - src/generators/syntax/declaration.template /*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a binding identifier. - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ +description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator Function declaration) +esid: prod-GeneratorDeclaration +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions -var result; -function* g() { - yield = 1; + GeneratorDeclaration : + function * BindingIdentifier ( FormalParameters ) { GeneratorBody } + + BindingIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +function *gen() { + var yield; } - -result = g().next(); -assert.sameValue(result.value, undefined); -assert.sameValue(result.done, true); diff --git a/test/language/statements/generators/yield-as-identifier-reference-escaped.js b/test/language/statements/generators/yield-as-identifier-reference-escaped.js new file mode 100644 index 0000000000..1627f627d4 --- /dev/null +++ b/test/language/statements/generators/yield-as-identifier-reference-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference-escaped.case +// - src/generators/syntax/declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator Function declaration) +esid: prod-GeneratorDeclaration +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorDeclaration : + function * BindingIdentifier ( FormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +function *gen() { + void yi\u0065ld; +} diff --git a/test/language/statements/generators/yield-as-identifier-reference.js b/test/language/statements/generators/yield-as-identifier-reference.js new file mode 100644 index 0000000000..12b70c619f --- /dev/null +++ b/test/language/statements/generators/yield-as-identifier-reference.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-identifier-reference.case +// - src/generators/syntax/declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator Function declaration) +esid: prod-GeneratorDeclaration +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorDeclaration : + function * BindingIdentifier ( FormalParameters ) { GeneratorBody } + + IdentifierReference : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +function *gen() { + void yield; +} diff --git a/test/language/statements/generators/yield-as-label-identifier-escaped.js b/test/language/statements/generators/yield-as-label-identifier-escaped.js new file mode 100644 index 0000000000..8687c362c5 --- /dev/null +++ b/test/language/statements/generators/yield-as-label-identifier-escaped.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier-escaped.case +// - src/generators/syntax/declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator Function declaration) +esid: prod-GeneratorDeclaration +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorDeclaration : + function * BindingIdentifier ( FormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +function *gen() { + yi\u0065ld: ; +} diff --git a/test/language/statements/generators/yield-as-label-identifier.js b/test/language/statements/generators/yield-as-label-identifier.js new file mode 100644 index 0000000000..e2cc7514dc --- /dev/null +++ b/test/language/statements/generators/yield-as-label-identifier.js @@ -0,0 +1,26 @@ +// This file was procedurally generated from the following sources: +// - src/generators/yield-as-label-identifier.case +// - src/generators/syntax/declaration.template +/*--- +description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator Function declaration) +esid: prod-GeneratorDeclaration +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + 14.4 Generator Function Definitions + + GeneratorDeclaration : + function * BindingIdentifier ( FormalParameters ) { GeneratorBody } + + LabelIdentifier : Identifier + + It is a Syntax Error if this production has a [Yield] parameter and + StringValue of Identifier is "yield". + +---*/ + +function *gen() { + yield: ; +} diff --git a/test/language/statements/generators/yield-as-label.js b/test/language/statements/generators/yield-as-label.js deleted file mode 100644 index 0da2b9a424..0000000000 --- a/test/language/statements/generators/yield-as-label.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as a label. - es6id: 12.1.1 - negative: - phase: early - type: SyntaxError - ---*/ - -function* g() { - yield: 1; -} diff --git a/test/language/statements/if/if-async-fun-else-async-fun.js b/test/language/statements/if/if-async-fun-else-async-fun.js new file mode 100644 index 0000000000..2c146f775d --- /dev/null +++ b/test/language/statements/if/if-async-fun-else-async-fun.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +if (true) async function f() { } else async function _f() {} diff --git a/test/language/statements/if/if-async-fun-else-stmt.js b/test/language/statements/if/if-async-fun-else-stmt.js new file mode 100644 index 0000000000..c686fb04cf --- /dev/null +++ b/test/language/statements/if/if-async-fun-else-stmt.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +if (true) async function f() { } else ; diff --git a/test/language/statements/if/if-async-fun-no-else.js b/test/language/statements/if/if-async-fun-no-else.js new file mode 100644 index 0000000000..0fdfc420f2 --- /dev/null +++ b/test/language/statements/if/if-async-fun-no-else.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +if (true) async function f() { } diff --git a/test/language/statements/if/if-async-gen-else-async-gen.js b/test/language/statements/if/if-async-gen-else-async-gen.js new file mode 100644 index 0000000000..a817fbebad --- /dev/null +++ b/test/language/statements/if/if-async-gen-else-async-gen.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +if (true) async function* f() { } else async function* _f() {} diff --git a/test/language/statements/if/if-async-gen-else-stmt.js b/test/language/statements/if/if-async-gen-else-stmt.js new file mode 100644 index 0000000000..41d8645400 --- /dev/null +++ b/test/language/statements/if/if-async-gen-else-stmt.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +if (true) async function* f() { } else ; diff --git a/test/language/statements/if/if-async-gen-no-else.js b/test/language/statements/if/if-async-gen-no-else.js new file mode 100644 index 0000000000..8becde1f99 --- /dev/null +++ b/test/language/statements/if/if-async-gen-no-else.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +if (true) async function* f() { } diff --git a/test/language/statements/if/if-stmt-else-async-fun.js b/test/language/statements/if/if-stmt-else-async-fun.js new file mode 100644 index 0000000000..67834c307f --- /dev/null +++ b/test/language/statements/if/if-stmt-else-async-fun.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +if (false) ; else async function f() { } diff --git a/test/language/statements/if/if-stmt-else-async-gen.js b/test/language/statements/if/if-stmt-else-async-gen.js new file mode 100644 index 0000000000..3a7c747825 --- /dev/null +++ b/test/language/statements/if/if-stmt-else-async-gen.js @@ -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. + +/*--- +esid: sec-if-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +if (false) ; else async function* f() { } diff --git a/test/language/statements/if/let-array-with-newline.js b/test/language/statements/if/let-array-with-newline.js new file mode 100644 index 0000000000..e0d970d4d0 --- /dev/null +++ b/test/language/statements/if/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-if-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +if (false) let +[a] = 0; diff --git a/test/language/statements/if/let-block-with-newline.js b/test/language/statements/if/let-block-with-newline.js new file mode 100644 index 0000000000..aac5dbb3d3 --- /dev/null +++ b/test/language/statements/if/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-if-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +if (false) let // ASI +{} diff --git a/test/language/statements/if/let-identifier-with-newline.js b/test/language/statements/if/let-identifier-with-newline.js new file mode 100644 index 0000000000..e4a646a5a0 --- /dev/null +++ b/test/language/statements/if/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-if-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +if (false) let // ASI +x = 1; diff --git a/test/language/statements/labeled/decl-async-function.js b/test/language/statements/labeled/decl-async-function.js new file mode 100644 index 0000000000..b302af9315 --- /dev/null +++ b/test/language/statements/labeled/decl-async-function.js @@ -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. + +/*--- +esid: sec-labelled-statements +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +label: async function f() {} diff --git a/test/language/statements/labeled/decl-async-generator.js b/test/language/statements/labeled/decl-async-generator.js new file mode 100644 index 0000000000..0f2c2baccc --- /dev/null +++ b/test/language/statements/labeled/decl-async-generator.js @@ -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. + +/*--- +esid: sec-labelled-statements +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +label: async function* g() {} diff --git a/test/language/statements/labeled/let-array-with-newline.js b/test/language/statements/labeled/let-array-with-newline.js new file mode 100644 index 0000000000..c8d5ffaa97 --- /dev/null +++ b/test/language/statements/labeled/let-array-with-newline.js @@ -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-labelled-statements +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + L: let + [a] = 0; +} diff --git a/test/language/statements/labeled/let-block-with-newline.js b/test/language/statements/labeled/let-block-with-newline.js new file mode 100644 index 0000000000..8a8d44c065 --- /dev/null +++ b/test/language/statements/labeled/let-block-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-labelled-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + L: let // ASI + {} +} diff --git a/test/language/statements/labeled/let-identifier-with-newline.js b/test/language/statements/labeled/let-identifier-with-newline.js new file mode 100644 index 0000000000..b8a184d7b5 --- /dev/null +++ b/test/language/statements/labeled/let-identifier-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-labelled-statements +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + L: let // ASI + x = 1; +} diff --git a/test/language/statements/labeled/value-await-module-escaped.js b/test/language/statements/labeled/value-await-module-escaped.js new file mode 100644 index 0000000000..7997a19faf --- /dev/null +++ b/test/language/statements/labeled/value-await-module-escaped.js @@ -0,0 +1,19 @@ +// 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 +description: > + `await` is a reserved identifier in module code and may not be used as a label. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module and + the StringValue of IdentifierName is "await". +negative: + phase: early + type: SyntaxError +flags: [module] +---*/ + +aw\u0061it: 1; diff --git a/test/language/statements/labeled/value-await-module.js b/test/language/statements/labeled/value-await-module.js new file mode 100644 index 0000000000..4744a2fd62 --- /dev/null +++ b/test/language/statements/labeled/value-await-module.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `await` is a reserved identifier in module code and may not be used as a label. +info: | + LabelIdentifier : await + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module. +negative: + phase: early + type: SyntaxError +flags: [module] +---*/ + +await: 1; diff --git a/test/language/statements/labeled/value-await-non-module-escaped.js b/test/language/statements/labeled/value-await-non-module-escaped.js new file mode 100644 index 0000000000..71cb1b51b7 --- /dev/null +++ b/test/language/statements/labeled/value-await-non-module-escaped.js @@ -0,0 +1,15 @@ +// 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 +description: > + `await` is not a reserved identifier in non-module code and may be used as a label. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module and + the StringValue of IdentifierName is "await". +---*/ + +aw\u0061it: 1; diff --git a/test/language/statements/labeled/value-await-non-module.js b/test/language/statements/labeled/value-await-non-module.js new file mode 100644 index 0000000000..295f92db4c --- /dev/null +++ b/test/language/statements/labeled/value-await-non-module.js @@ -0,0 +1,14 @@ +// 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 +description: > + `await` is not a reserved identifier in non-module code and may be used as a label. +info: | + LabelIdentifier : await + + It is a Syntax Error if the goal symbol of the syntactic grammar is Module. +---*/ + +await: 1; diff --git a/test/language/statements/labeled/value-yield-non-strict-escaped.js b/test/language/statements/labeled/value-yield-non-strict-escaped.js new file mode 100644 index 0000000000..a8a328fb41 --- /dev/null +++ b/test/language/statements/labeled/value-yield-non-strict-escaped.js @@ -0,0 +1,11 @@ +// 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 +description: > + `yield` is not a reserved identifier in non-strict mode code and may be used as a label. +flags: [noStrict] +---*/ + +yi\u0065ld: 1; diff --git a/test/language/statements/labeled/value-yield-strict-escaped.js b/test/language/statements/labeled/value-yield-strict-escaped.js new file mode 100644 index 0000000000..d77bea83b2 --- /dev/null +++ b/test/language/statements/labeled/value-yield-strict-escaped.js @@ -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. + +/*--- +esid: sec-identifiers-static-semantics-early-errors +description: > + `yield` is a reserved identifier in strict mode code and may not be used as a label. +info: | + Identifier : IdentifierName but not ReservedWord + + It is a Syntax Error if this phrase is contained in strict mode code and the + StringValue of IdentifierName is: "implements", "interface", "let", "package", + "private", "protected", "public", "static", or "yield". +negative: + phase: early + type: SyntaxError +flags: [onlyStrict] +---*/ + +yi\u0065ld: 1; diff --git a/test/language/statements/let/syntax/escaped-let.js b/test/language/statements/let/syntax/escaped-let.js new file mode 100644 index 0000000000..3c51a24841 --- /dev/null +++ b/test/language/statements/let/syntax/escaped-let.js @@ -0,0 +1,27 @@ +// 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 `let` 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. +flags: [noStrict] +---*/ + +// Add a global property "let", so we won't get a runtime reference error below. +this.let = 0; + +l\u0065t // ASI +a; + +// If the parser treated the previous escaped "let" as a lexical declaration, +// this variable declaration will result an early syntax error. +var a; diff --git a/test/language/statements/while/decl-async-fun.js b/test/language/statements/while/decl-async-fun.js new file mode 100644 index 0000000000..76e14cb7b0 --- /dev/null +++ b/test/language/statements/while/decl-async-fun.js @@ -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. + +/*--- +esid: sec-while-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +---*/ + +while (false) async function f() {} diff --git a/test/language/statements/while/decl-async-gen.js b/test/language/statements/while/decl-async-gen.js new file mode 100644 index 0000000000..5cdacb1eea --- /dev/null +++ b/test/language/statements/while/decl-async-gen.js @@ -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. + +/*--- +esid: sec-while-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +---*/ + +while (false) async function* g() {} diff --git a/test/language/statements/while/let-array-with-newline.js b/test/language/statements/while/let-array-with-newline.js new file mode 100644 index 0000000000..55b13d6d09 --- /dev/null +++ b/test/language/statements/while/let-array-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-while-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +while (false) let +[a] = 0; diff --git a/test/language/statements/while/let-block-with-newline.js b/test/language/statements/while/let-block-with-newline.js new file mode 100644 index 0000000000..fa2a2ae6d7 --- /dev/null +++ b/test/language/statements/while/let-block-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-while-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +while (false) let // ASI +{} diff --git a/test/language/statements/while/let-identifier-with-newline.js b/test/language/statements/while/let-identifier-with-newline.js new file mode 100644 index 0000000000..634960798d --- /dev/null +++ b/test/language/statements/while/let-identifier-with-newline.js @@ -0,0 +1,16 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-while-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +while (false) let // ASI +x = 1; diff --git a/test/language/statements/with/decl-async-fun.js b/test/language/statements/with/decl-async-fun.js new file mode 100644 index 0000000000..77f69d1d9b --- /dev/null +++ b/test/language/statements/with/decl-async-fun.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-with-statement +description: > + AsyncFunctionDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-functions] +flags: [noStrict] +---*/ + +with ({}) async function f() {} diff --git a/test/language/statements/with/decl-async-gen.js b/test/language/statements/with/decl-async-gen.js new file mode 100644 index 0000000000..98d2b2e12e --- /dev/null +++ b/test/language/statements/with/decl-async-gen.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-with-statement +description: > + AsyncGeneratorDeclaration is not allowed in statement position +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +features: [async-iteration] +flags: [noStrict] +---*/ + +with ({}) async function* g() {} diff --git a/test/language/statements/with/let-array-with-newline.js b/test/language/statements/with/let-array-with-newline.js new file mode 100644 index 0000000000..d1e53378eb --- /dev/null +++ b/test/language/statements/with/let-array-with-newline.js @@ -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-with-statement +description: > + ExpressionStatement has a lookahead restriction for `let [`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +negative: + phase: early + type: SyntaxError +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + with ({}) let + [a] = 0; +} diff --git a/test/language/statements/with/let-block-with-newline.js b/test/language/statements/with/let-block-with-newline.js new file mode 100644 index 0000000000..90d0141a0e --- /dev/null +++ b/test/language/statements/with/let-block-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-with-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let {`. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + with ({}) let // ASI + {} +} diff --git a/test/language/statements/with/let-identifier-with-newline.js b/test/language/statements/with/let-identifier-with-newline.js new file mode 100644 index 0000000000..f938fc2c8c --- /dev/null +++ b/test/language/statements/with/let-identifier-with-newline.js @@ -0,0 +1,19 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-with-statement +description: > + ExpressionStatement doesn't have a lookahead restriction for `let `. +info: | + ExpressionStatement[Yield, Await] : + [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] + Expression[+In, ?Yield, ?Await] ; +flags: [noStrict] +---*/ + +// Wrapped in an if-statement to avoid reference errors at runtime. +if (false) { + with ({}) let // ASI + x = 1; +}