Skip to content
Snippets Groups Projects
Unverified Commit 2c714ede authored by Rick Waldron's avatar Rick Waldron Committed by GitHub
Browse files

Merge pull request #1719 from leobalter/private-fields-methods-whitespace-syntax-error

Private fields and methods whitespace syntax error
parents eda30f89 a17484e2
Branches
No related tags found
No related merge requests found
Showing
with 433 additions and 0 deletions
// 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() {}
// 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(_) {}
// 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() {}
// 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() {}
// 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;
}
// 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;
// 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;
// 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() {}
// 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;
}
// 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() {}
// 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() {}
// 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(_) {}
// 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() {}
// 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() {}
// 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;
// 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;
// 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() {}
// 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() {}
// 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() {}
};
// 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(_) {}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment