From 19df5b04b26055423e6d73754e7e461fe9bfdd7f Mon Sep 17 00:00:00 2001 From: jbhoosreddy Date: Tue, 4 Sep 2018 22:28:09 -0400 Subject: [PATCH 1/3] private fields/methods whitespace syntax error (#1343) --- ...s-private-field-whitespace-syntax-error.case | 10 ++++++++++ ...r-method-static-whitespace-syntax-error.case | 15 +++++++++++++++ ...enerator-method-whitespace-syntax-error.case | 15 +++++++++++++++ ...c-method-static-whitespace-syntax-error.case | 15 +++++++++++++++ ...te-async-method-whitespace-syntax-error.case | 15 +++++++++++++++ ...r-method-static-whitespace-syntax-error.case | 15 +++++++++++++++ ...enerator-method-whitespace-syntax-error.case | 15 +++++++++++++++ ...e-getter-static-whitespace-syntax-error.case | 15 +++++++++++++++ ...-private-getter-whitespace-syntax-error.case | 15 +++++++++++++++ ...e-method-static-whitespace-syntax-error.case | 15 +++++++++++++++ ...-private-method-whitespace-syntax-error.case | 15 +++++++++++++++ ...te-method-whitespace-usage-syntax-error.case | 17 +++++++++++++++++ ...e-setter-static-whitespace-syntax-error.case | 15 +++++++++++++++ ...-private-setter-whitespace-syntax-error.case | 15 +++++++++++++++ src/class-methods/syntax/class-decl.template | 13 +++++++++++++ src/class-methods/syntax/class-expr.template | 13 +++++++++++++ 16 files changed, 233 insertions(+) create mode 100644 src/class-elements/class-private-field-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-async-method-static-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-async-method-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-generator-method-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-getter-static-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-getter-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-method-static-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-method-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-method-whitespace-usage-syntax-error.case create mode 100644 src/class-methods/class-private-setter-static-whitespace-syntax-error.case create mode 100644 src/class-methods/class-private-setter-whitespace-syntax-error.case create mode 100644 src/class-methods/syntax/class-decl.template create mode 100644 src/class-methods/syntax/class-expr.template diff --git a/src/class-elements/class-private-field-whitespace-syntax-error.case b/src/class-elements/class-private-field-whitespace-syntax-error.case new file mode 100644 index 0000000000..37d3702700 --- /dev/null +++ b/src/class-elements/class-private-field-whitespace-syntax-error.case @@ -0,0 +1,10 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax/invalid +features: [class-fields-private] +---*/ + +//- fields +# x = 1 diff --git a/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case new file mode 100644 index 0000000000..ea3e7374ed --- /dev/null +++ b/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static async * # m() {} diff --git a/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case b/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case new file mode 100644 index 0000000000..8989cb811b --- /dev/null +++ b/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +async * # m() {} diff --git a/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case new file mode 100644 index 0000000000..12106904ea --- /dev/null +++ b/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static async # m() {} diff --git a/src/class-methods/class-private-async-method-whitespace-syntax-error.case b/src/class-methods/class-private-async-method-whitespace-syntax-error.case new file mode 100644 index 0000000000..a7a2c25958 --- /dev/null +++ b/src/class-methods/class-private-async-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +async # m() {} diff --git a/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case new file mode 100644 index 0000000000..37069b4fee --- /dev/null +++ b/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static * # m() {} diff --git a/src/class-methods/class-private-generator-method-whitespace-syntax-error.case b/src/class-methods/class-private-generator-method-whitespace-syntax-error.case new file mode 100644 index 0000000000..3a97227731 --- /dev/null +++ b/src/class-methods/class-private-generator-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +* # m() {} diff --git a/src/class-methods/class-private-getter-static-whitespace-syntax-error.case b/src/class-methods/class-private-getter-static-whitespace-syntax-error.case new file mode 100644 index 0000000000..65525415b3 --- /dev/null +++ b/src/class-methods/class-private-getter-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static set # m() {} diff --git a/src/class-methods/class-private-getter-whitespace-syntax-error.case b/src/class-methods/class-private-getter-whitespace-syntax-error.case new file mode 100644 index 0000000000..2c067f1372 --- /dev/null +++ b/src/class-methods/class-private-getter-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +get # m() {} diff --git a/src/class-methods/class-private-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-method-static-whitespace-syntax-error.case new file mode 100644 index 0000000000..c29a56416b --- /dev/null +++ b/src/class-methods/class-private-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static # m() {} diff --git a/src/class-methods/class-private-method-whitespace-syntax-error.case b/src/class-methods/class-private-method-whitespace-syntax-error.case new file mode 100644 index 0000000000..cd0feaeb5f --- /dev/null +++ b/src/class-methods/class-private-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +# m() {} diff --git a/src/class-methods/class-private-method-whitespace-usage-syntax-error.case b/src/class-methods/class-private-method-whitespace-usage-syntax-error.case new file mode 100644 index 0000000000..dd53217e3c --- /dev/null +++ b/src/class-methods/class-private-method-whitespace-usage-syntax-error.case @@ -0,0 +1,17 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +m() { + this.# x = 1; +} diff --git a/src/class-methods/class-private-setter-static-whitespace-syntax-error.case b/src/class-methods/class-private-setter-static-whitespace-syntax-error.case new file mode 100644 index 0000000000..65525415b3 --- /dev/null +++ b/src/class-methods/class-private-setter-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static set # m() {} diff --git a/src/class-methods/class-private-setter-whitespace-syntax-error.case b/src/class-methods/class-private-setter-whitespace-syntax-error.case new file mode 100644 index 0000000000..c9c7dca58b --- /dev/null +++ b/src/class-methods/class-private-setter-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + /*--- +desc: Syntax error if whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +set # m() {} diff --git a/src/class-methods/syntax/class-decl.template b/src/class-methods/syntax/class-decl.template new file mode 100644 index 0000000000..e7f3172437 --- /dev/null +++ b/src/class-methods/syntax/class-decl.template @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-ClassElement +name: class declaration +path: language/statements/class/syntax- +features: [class] +---*/ + +class C { + /*{ methods }*/ +} diff --git a/src/class-methods/syntax/class-expr.template b/src/class-methods/syntax/class-expr.template new file mode 100644 index 0000000000..7a0c64a32f --- /dev/null +++ b/src/class-methods/syntax/class-expr.template @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-ClassElement +name: class expression +path: language/expressions/class/syntax- +features: [class] +---*/ + +var C = class { + /*{ methods }*/ +}; From b183a6f5686adccde273640d73cc3d95d4d661df Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Mon, 10 Sep 2018 16:52:26 -0400 Subject: [PATCH 2/3] Update tests to verify lexical grammar of private names No whitespace allowed between the sigil and the identifier name --- ...private-field-whitespace-syntax-error.case | 10 ------- ...me-whitespace-error-accessor-get-meth.case | 20 +++++++++++++ ...me-whitespace-error-accessor-set-meth.case | 20 +++++++++++++ ...ename-whitespace-error-async-gen-meth.case | 20 +++++++++++++ ...ivatename-whitespace-error-async-meth.case | 20 +++++++++++++ ...rivatename-whitespace-error-call-expr.case | 30 +++++++++++++++++++ ...ivatename-whitespace-error-field-init.case | 20 +++++++++++++ ...ar-privatename-whitespace-error-field.case | 20 +++++++++++++ ...privatename-whitespace-error-gen-meth.case | 20 +++++++++++++ ...vatename-whitespace-error-member-expr.case | 25 ++++++++++++++++ ...rivatename-whitespace-error-meth.case.case | 20 +++++++++++++ ...espace-error-static-accessor-get-meth.case | 20 +++++++++++++ ...espace-error-static-accessor-set-meth.case | 20 +++++++++++++ ...hitespace-error-static-async-gen-meth.case | 20 +++++++++++++ ...me-whitespace-error-static-async-meth.case | 20 +++++++++++++ ...me-whitespace-error-static-field-init.case | 20 +++++++++++++ ...atename-whitespace-error-static-field.case | 20 +++++++++++++ ...name-whitespace-error-static-gen-meth.case | 20 +++++++++++++ ...vatename-whitespace-error-static-meth.case | 20 +++++++++++++ ...method-static-whitespace-syntax-error.case | 15 ---------- ...erator-method-whitespace-syntax-error.case | 15 ---------- ...method-static-whitespace-syntax-error.case | 15 ---------- ...-async-method-whitespace-syntax-error.case | 15 ---------- ...method-static-whitespace-syntax-error.case | 15 ---------- ...erator-method-whitespace-syntax-error.case | 15 ---------- ...getter-static-whitespace-syntax-error.case | 15 ---------- ...rivate-getter-whitespace-syntax-error.case | 15 ---------- ...method-static-whitespace-syntax-error.case | 15 ---------- ...rivate-method-whitespace-syntax-error.case | 15 ---------- ...-method-whitespace-usage-syntax-error.case | 17 ----------- ...setter-static-whitespace-syntax-error.case | 15 ---------- ...rivate-setter-whitespace-syntax-error.case | 15 ---------- src/class-methods/syntax/class-decl.template | 13 -------- src/class-methods/syntax/class-expr.template | 13 -------- 34 files changed, 375 insertions(+), 233 deletions(-) delete mode 100644 src/class-elements/class-private-field-whitespace-syntax-error.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-accessor-get-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-accessor-set-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-async-gen-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-async-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-call-expr.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-field-init.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-field.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-gen-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-member-expr.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-meth.case.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-accessor-get-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-accessor-set-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-async-gen-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-async-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-field-init.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-field.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-gen-meth.case create mode 100644 src/class-elements/grammar-privatename-whitespace-error-static-meth.case delete mode 100644 src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-async-method-static-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-async-method-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-generator-method-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-getter-static-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-getter-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-method-static-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-method-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-method-whitespace-usage-syntax-error.case delete mode 100644 src/class-methods/class-private-setter-static-whitespace-syntax-error.case delete mode 100644 src/class-methods/class-private-setter-whitespace-syntax-error.case delete mode 100644 src/class-methods/syntax/class-decl.template delete mode 100644 src/class-methods/syntax/class-expr.template diff --git a/src/class-elements/class-private-field-whitespace-syntax-error.case b/src/class-elements/class-private-field-whitespace-syntax-error.case deleted file mode 100644 index 37d3702700..0000000000 --- a/src/class-elements/class-private-field-whitespace-syntax-error.case +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax/invalid -features: [class-fields-private] ----*/ - -//- fields -# x = 1 diff --git a/src/class-elements/grammar-privatename-whitespace-error-accessor-get-meth.case b/src/class-elements/grammar-privatename-whitespace-error-accessor-get-meth.case new file mode 100644 index 0000000000..23473a93bf --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-accessor-get-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName () +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-methods-private] +---*/ + +//- elements +get # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-accessor-set-meth.case b/src/class-elements/grammar-privatename-whitespace-error-accessor-set-meth.case new file mode 100644 index 0000000000..c27d6e4d38 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-accessor-set-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Accessor set Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-methods-private] +---*/ + +//- elements +set # m(_) {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-async-gen-meth.case b/src/class-elements/grammar-privatename-whitespace-error-async-gen-meth.case new file mode 100644 index 0000000000..7d380ff861 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-async-gen-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Async Generator Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [async-iteration, class-methods-private] +---*/ + +//- elements +async * # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-async-meth.case b/src/class-elements/grammar-privatename-whitespace-error-async-meth.case new file mode 100644 index 0000000000..949ad6fef2 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-async-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Async Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [async-functions, class-methods-private] +---*/ + +//- elements +async # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-call-expr.case b/src/class-elements/grammar-privatename-whitespace-error-call-expr.case new file mode 100644 index 0000000000..72d8dc7fd7 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-call-expr.case @@ -0,0 +1,30 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (CallExpression) +info: | + Updated Productions + + MemberExpression : + MemberExpression . PrivateName + + CallExpression : + CallExpression . PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-fields-private] +---*/ + +//- elements +#x; + +f() { + return this; +} + +m() { + this.f().# x; +} diff --git a/src/class-elements/grammar-privatename-whitespace-error-field-init.case b/src/class-elements/grammar-privatename-whitespace-error-field-init.case new file mode 100644 index 0000000000..bd3023afe5 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-field-init.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Field with Initializer) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-fields-private] +---*/ + +//- elements +# x = 1; diff --git a/src/class-elements/grammar-privatename-whitespace-error-field.case b/src/class-elements/grammar-privatename-whitespace-error-field.case new file mode 100644 index 0000000000..60fa47bc6b --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-field.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Field) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-fields-private] +---*/ + +//- elements +# x; diff --git a/src/class-elements/grammar-privatename-whitespace-error-gen-meth.case b/src/class-elements/grammar-privatename-whitespace-error-gen-meth.case new file mode 100644 index 0000000000..e918163a5a --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-gen-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Generator Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [generators, class-methods-private] +---*/ + +//- elements +* # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-member-expr.case b/src/class-elements/grammar-privatename-whitespace-error-member-expr.case new file mode 100644 index 0000000000..1688ff75db --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-member-expr.case @@ -0,0 +1,25 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (MemberExpression) +info: | + Updated Productions + + MemberExpression : + MemberExpression . PrivateName + + CallExpression : + CallExpression . PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-fields-private] +---*/ + +//- elements +#x; +m() { + this.# x; +} diff --git a/src/class-elements/grammar-privatename-whitespace-error-meth.case.case b/src/class-elements/grammar-privatename-whitespace-error-meth.case.case new file mode 100644 index 0000000000..83d1cb6979 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-meth.case.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-methods-private] +---*/ + +//- elements +# m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-accessor-get-meth.case b/src/class-elements/grammar-privatename-whitespace-error-static-accessor-get-meth.case new file mode 100644 index 0000000000..1a681a7fea --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-accessor-get-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Static Accessor get Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-static-methods-private] +---*/ + +//- elements +static get # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-accessor-set-meth.case b/src/class-elements/grammar-privatename-whitespace-error-static-accessor-set-meth.case new file mode 100644 index 0000000000..69f4fee00b --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-accessor-set-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Static Accessor set Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-static-methods-private] +---*/ + +//- elements +static set # m(_) {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-async-gen-meth.case b/src/class-elements/grammar-privatename-whitespace-error-static-async-gen-meth.case new file mode 100644 index 0000000000..22dcf3cf53 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-async-gen-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Static Async Generator Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [async-iteration, class-static-methods-private] +---*/ + +//- elements +static async * # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-async-meth.case b/src/class-elements/grammar-privatename-whitespace-error-static-async-meth.case new file mode 100644 index 0000000000..fb0631565c --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-async-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Async Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-static-methods-private] +---*/ + +//- elements +static async # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-field-init.case b/src/class-elements/grammar-privatename-whitespace-error-static-field-init.case new file mode 100644 index 0000000000..61b592afac --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-field-init.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Static Field with Initializer) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-static-fields-private] +---*/ + +//- elements +static # x = 1; diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-field.case b/src/class-elements/grammar-privatename-whitespace-error-static-field.case new file mode 100644 index 0000000000..268439e46f --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-field.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Static Field) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-static-fields-private] +---*/ + +//- elements +static # x; diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-gen-meth.case b/src/class-elements/grammar-privatename-whitespace-error-static-gen-meth.case new file mode 100644 index 0000000000..c69b9affd4 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-gen-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Static Generator Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [generators, class-static-methods-private] +---*/ + +//- elements +static * # m() {} diff --git a/src/class-elements/grammar-privatename-whitespace-error-static-meth.case b/src/class-elements/grammar-privatename-whitespace-error-static-meth.case new file mode 100644 index 0000000000..e51d5a44d8 --- /dev/null +++ b/src/class-elements/grammar-privatename-whitespace-error-static-meth.case @@ -0,0 +1,20 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: No space allowed between sigil and IdentifierName (Static Method) +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName +template: syntax/invalid +features: [class-static-methods-private] +---*/ + +//- elements +static # m() {} diff --git a/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case deleted file mode 100644 index ea3e7374ed..0000000000 --- a/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -static async * # m() {} diff --git a/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case b/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case deleted file mode 100644 index 8989cb811b..0000000000 --- a/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -async * # m() {} diff --git a/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case deleted file mode 100644 index 12106904ea..0000000000 --- a/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -static async # m() {} diff --git a/src/class-methods/class-private-async-method-whitespace-syntax-error.case b/src/class-methods/class-private-async-method-whitespace-syntax-error.case deleted file mode 100644 index a7a2c25958..0000000000 --- a/src/class-methods/class-private-async-method-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -async # m() {} diff --git a/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case deleted file mode 100644 index 37069b4fee..0000000000 --- a/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -static * # m() {} diff --git a/src/class-methods/class-private-generator-method-whitespace-syntax-error.case b/src/class-methods/class-private-generator-method-whitespace-syntax-error.case deleted file mode 100644 index 3a97227731..0000000000 --- a/src/class-methods/class-private-generator-method-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -* # m() {} diff --git a/src/class-methods/class-private-getter-static-whitespace-syntax-error.case b/src/class-methods/class-private-getter-static-whitespace-syntax-error.case deleted file mode 100644 index 65525415b3..0000000000 --- a/src/class-methods/class-private-getter-static-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -static set # m() {} diff --git a/src/class-methods/class-private-getter-whitespace-syntax-error.case b/src/class-methods/class-private-getter-whitespace-syntax-error.case deleted file mode 100644 index 2c067f1372..0000000000 --- a/src/class-methods/class-private-getter-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -get # m() {} diff --git a/src/class-methods/class-private-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-method-static-whitespace-syntax-error.case deleted file mode 100644 index c29a56416b..0000000000 --- a/src/class-methods/class-private-method-static-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -static # m() {} diff --git a/src/class-methods/class-private-method-whitespace-syntax-error.case b/src/class-methods/class-private-method-whitespace-syntax-error.case deleted file mode 100644 index cd0feaeb5f..0000000000 --- a/src/class-methods/class-private-method-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -# m() {} diff --git a/src/class-methods/class-private-method-whitespace-usage-syntax-error.case b/src/class-methods/class-private-method-whitespace-usage-syntax-error.case deleted file mode 100644 index dd53217e3c..0000000000 --- a/src/class-methods/class-private-method-whitespace-usage-syntax-error.case +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -m() { - this.# x = 1; -} diff --git a/src/class-methods/class-private-setter-static-whitespace-syntax-error.case b/src/class-methods/class-private-setter-static-whitespace-syntax-error.case deleted file mode 100644 index 65525415b3..0000000000 --- a/src/class-methods/class-private-setter-static-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -static set # m() {} diff --git a/src/class-methods/class-private-setter-whitespace-syntax-error.case b/src/class-methods/class-private-setter-whitespace-syntax-error.case deleted file mode 100644 index c9c7dca58b..0000000000 --- a/src/class-methods/class-private-setter-whitespace-syntax-error.case +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - /*--- -desc: Syntax error if whitespace after '#' sigil -template: syntax -features: [class-methods-private] -negative: - phase: parse - type: SyntaxError ----*/ -//- setup -throw "Test262: This statement should not be evaluated."; - - //- methods -set # m() {} diff --git a/src/class-methods/syntax/class-decl.template b/src/class-methods/syntax/class-decl.template deleted file mode 100644 index e7f3172437..0000000000 --- a/src/class-methods/syntax/class-decl.template +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: prod-ClassElement -name: class declaration -path: language/statements/class/syntax- -features: [class] ----*/ - -class C { - /*{ methods }*/ -} diff --git a/src/class-methods/syntax/class-expr.template b/src/class-methods/syntax/class-expr.template deleted file mode 100644 index 7a0c64a32f..0000000000 --- a/src/class-methods/syntax/class-expr.template +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2018 Bloomberg LP. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: prod-ClassElement -name: class expression -path: language/expressions/class/syntax- -features: [class] ----*/ - -var C = class { - /*{ methods }*/ -}; From a17484e230bc02a1c114364768247666e8d7f867 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Mon, 10 Sep 2018 16:58:12 -0400 Subject: [PATCH 3/3] Generate Tests --- ...name-whitespace-error-accessor-get-meth.js | 29 ++++++++++++++ ...name-whitespace-error-accessor-set-meth.js | 29 ++++++++++++++ ...atename-whitespace-error-async-gen-meth.js | 29 ++++++++++++++ ...privatename-whitespace-error-async-meth.js | 29 ++++++++++++++ ...-privatename-whitespace-error-call-expr.js | 39 +++++++++++++++++++ ...privatename-whitespace-error-field-init.js | 29 ++++++++++++++ ...mmar-privatename-whitespace-error-field.js | 29 ++++++++++++++ ...r-privatename-whitespace-error-gen-meth.js | 29 ++++++++++++++ ...rivatename-whitespace-error-member-expr.js | 34 ++++++++++++++++ ...-privatename-whitespace-error-meth.case.js | 29 ++++++++++++++ ...itespace-error-static-accessor-get-meth.js | 29 ++++++++++++++ ...itespace-error-static-accessor-set-meth.js | 29 ++++++++++++++ ...-whitespace-error-static-async-gen-meth.js | 29 ++++++++++++++ ...name-whitespace-error-static-async-meth.js | 29 ++++++++++++++ ...name-whitespace-error-static-field-init.js | 29 ++++++++++++++ ...ivatename-whitespace-error-static-field.js | 29 ++++++++++++++ ...tename-whitespace-error-static-gen-meth.js | 29 ++++++++++++++ ...rivatename-whitespace-error-static-meth.js | 29 ++++++++++++++ ...name-whitespace-error-accessor-get-meth.js | 29 ++++++++++++++ ...name-whitespace-error-accessor-set-meth.js | 29 ++++++++++++++ ...atename-whitespace-error-async-gen-meth.js | 29 ++++++++++++++ ...privatename-whitespace-error-async-meth.js | 29 ++++++++++++++ ...-privatename-whitespace-error-call-expr.js | 39 +++++++++++++++++++ ...privatename-whitespace-error-field-init.js | 29 ++++++++++++++ ...mmar-privatename-whitespace-error-field.js | 29 ++++++++++++++ ...r-privatename-whitespace-error-gen-meth.js | 29 ++++++++++++++ ...rivatename-whitespace-error-member-expr.js | 34 ++++++++++++++++ ...-privatename-whitespace-error-meth.case.js | 29 ++++++++++++++ ...itespace-error-static-accessor-get-meth.js | 29 ++++++++++++++ ...itespace-error-static-accessor-set-meth.js | 29 ++++++++++++++ ...-whitespace-error-static-async-gen-meth.js | 29 ++++++++++++++ ...name-whitespace-error-static-async-meth.js | 29 ++++++++++++++ ...name-whitespace-error-static-field-init.js | 29 ++++++++++++++ ...ivatename-whitespace-error-static-field.js | 29 ++++++++++++++ ...tename-whitespace-error-static-gen-meth.js | 29 ++++++++++++++ ...rivatename-whitespace-error-static-meth.js | 29 ++++++++++++++ 36 files changed, 1074 insertions(+) create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js create mode 100644 test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js create mode 100644 test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js new file mode 100644 index 0000000000..210e9273b7 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-accessor-get-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName () (class expression) +esid: prod-ClassElement +features: [class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + get # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js new file mode 100644 index 0000000000..7009f14b32 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-accessor-set-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Accessor set Method) (class expression) +esid: prod-ClassElement +features: [class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + set # m(_) {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js new file mode 100644 index 0000000000..4f4c4299bc --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-async-gen-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Async Generator Method) (class expression) +esid: prod-ClassElement +features: [async-iteration, class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + async * # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js new file mode 100644 index 0000000000..abb36632e6 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-async-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Async Method) (class expression) +esid: prod-ClassElement +features: [async-functions, class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + async # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js new file mode 100644 index 0000000000..c55c228e68 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-call-expr.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (CallExpression) (class expression) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + MemberExpression : + MemberExpression . PrivateName + + CallExpression : + CallExpression . PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + f() { + return this; + } + + m() { + this.f().# x; + } +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js new file mode 100644 index 0000000000..9b4cfac85b --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-field-init.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Field with Initializer) (class expression) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + # x = 1; +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js new file mode 100644 index 0000000000..9b8fdc559d --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-field.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Field) (class expression) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + # x; +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js new file mode 100644 index 0000000000..5c439fa733 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-gen-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Generator Method) (class expression) +esid: prod-ClassElement +features: [generators, class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + * # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js new file mode 100644 index 0000000000..0f8aed61d7 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-member-expr.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (MemberExpression) (class expression) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + MemberExpression : + MemberExpression . PrivateName + + CallExpression : + CallExpression . PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + m() { + this.# x; + } +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js new file mode 100644 index 0000000000..21aaa39e93 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-meth.case.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Method) (class expression) +esid: prod-ClassElement +features: [class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js new file mode 100644 index 0000000000..e084c26643 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-accessor-get-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Accessor get Method) (class expression) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static get # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js new file mode 100644 index 0000000000..9f395efa7b --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-accessor-set-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Accessor set Method) (class expression) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static set # m(_) {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js new file mode 100644 index 0000000000..df4ffee9dc --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-async-gen-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Async Generator Method) (class expression) +esid: prod-ClassElement +features: [async-iteration, class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static async * # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js new file mode 100644 index 0000000000..496b2b367f --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-async-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Async Method) (class expression) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static async # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js new file mode 100644 index 0000000000..485953fbc1 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-field-init.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Field with Initializer) (class expression) +esid: prod-ClassElement +features: [class-static-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static # x = 1; +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js new file mode 100644 index 0000000000..7ff5cc5b8f --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-field.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Field) (class expression) +esid: prod-ClassElement +features: [class-static-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static # x; +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js new file mode 100644 index 0000000000..e04f055e8c --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-gen-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Generator Method) (class expression) +esid: prod-ClassElement +features: [generators, class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static * # m() {} +}; diff --git a/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js new file mode 100644 index 0000000000..acdb9c4987 --- /dev/null +++ b/test/language/expressions/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-meth.case +// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Method) (class expression) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static # m() {} +}; diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js new file mode 100644 index 0000000000..a382483164 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-get-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-accessor-get-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName () (class declaration) +esid: prod-ClassElement +features: [class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + get # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js new file mode 100644 index 0000000000..7622026546 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-accessor-set-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-accessor-set-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Accessor set Method) (class declaration) +esid: prod-ClassElement +features: [class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + set # m(_) {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js new file mode 100644 index 0000000000..3a2482d23d --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-async-gen-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Async Generator Method) (class declaration) +esid: prod-ClassElement +features: [async-iteration, class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + async * # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js new file mode 100644 index 0000000000..cb164f91bc --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-async-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-async-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Async Method) (class declaration) +esid: prod-ClassElement +features: [async-functions, class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + async # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js new file mode 100644 index 0000000000..72ca4a44bd --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-call-expr.js @@ -0,0 +1,39 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-call-expr.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (CallExpression) (class declaration) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + MemberExpression : + MemberExpression . PrivateName + + CallExpression : + CallExpression . PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + f() { + return this; + } + + m() { + this.f().# x; + } +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js new file mode 100644 index 0000000000..8ccdf37c07 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field-init.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-field-init.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Field with Initializer) (class declaration) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + # x = 1; +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js new file mode 100644 index 0000000000..f0f3b55a64 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-field.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-field.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Field) (class declaration) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + # x; +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js new file mode 100644 index 0000000000..45931eaff3 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-gen-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Generator Method) (class declaration) +esid: prod-ClassElement +features: [generators, class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + * # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js new file mode 100644 index 0000000000..042d0a3dcf --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-member-expr.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-member-expr.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (MemberExpression) (class declaration) +esid: prod-ClassElement +features: [class-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + MemberExpression : + MemberExpression . PrivateName + + CallExpression : + CallExpression . PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + m() { + this.# x; + } +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js new file mode 100644 index 0000000000..7144a87b5b --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-meth.case.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-meth.case.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Method) (class declaration) +esid: prod-ClassElement +features: [class-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js new file mode 100644 index 0000000000..1c269ef34d --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-get-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-accessor-get-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Accessor get Method) (class declaration) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static get # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js new file mode 100644 index 0000000000..93420492b8 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-accessor-set-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-accessor-set-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Accessor set Method) (class declaration) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static set # m(_) {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js new file mode 100644 index 0000000000..085f6d294b --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-async-gen-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Async Generator Method) (class declaration) +esid: prod-ClassElement +features: [async-iteration, class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static async * # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js new file mode 100644 index 0000000000..b6944764bc --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-async-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-async-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Async Method) (class declaration) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static async # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js new file mode 100644 index 0000000000..906706e4ff --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field-init.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-field-init.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Field with Initializer) (class declaration) +esid: prod-ClassElement +features: [class-static-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static # x = 1; +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js new file mode 100644 index 0000000000..c2105bc3f8 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-field.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-field.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Field) (class declaration) +esid: prod-ClassElement +features: [class-static-fields-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static # x; +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js new file mode 100644 index 0000000000..b37e016cf0 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-gen-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-gen-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Generator Method) (class declaration) +esid: prod-ClassElement +features: [generators, class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static * # m() {} +} diff --git a/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js new file mode 100644 index 0000000000..9fb520ddf2 --- /dev/null +++ b/test/language/statements/class/syntax/early-errors/grammar-privatename-whitespace-error-static-meth.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-elements/grammar-privatename-whitespace-error-static-meth.case +// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template +/*--- +description: No space allowed between sigil and IdentifierName (Static Method) (class declaration) +esid: prod-ClassElement +features: [class-static-methods-private, class] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + Updated Productions + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static # m() {} +}