mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Class Fields: extensive static and runtime production verification cases & templates
This commit is contained in:
parent
f222b94f2a
commit
c794f43af3
@ -0,0 +1,68 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: FieldDefinition, ClassElementName, PropertyName = Initializer Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
...
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
|
||||
Initializer :
|
||||
= AssignmentExpression
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart ::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart ::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue ::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
$ = 1;
|
||||
_ = 2;
|
||||
\u{6F} = 3;
|
||||
℘ = 4; // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
ZW__NJ = 5; // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
ZW__J = 6; // DO NOT CHANGE THE NAME OF THIS FIELD
|
@ -0,0 +1,68 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: FieldDefinition, ClassElementName, PropertyName = Initializer Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
...
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
|
||||
Initializer :
|
||||
= AssignmentExpression
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart ::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart ::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue ::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
$ = 1;
|
||||
_ = 2;
|
||||
\u{6F} = 3;
|
||||
\u2118 = 4;
|
||||
ZW_\u200C_NJ = 5;
|
||||
ZW_\u200D_J = 6;
|
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: SyntaxError
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
x = []
|
||||
y;
|
68
src/class-fields/grammar-field-identifier-alt.case
Normal file
68
src/class-fields/grammar-field-identifier-alt.case
Normal file
@ -0,0 +1,68 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid FieldDefinition, ClassElementName, PropertyName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
StringLiteral
|
||||
NumericLiteral
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart ::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart ::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue ::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
$;
|
||||
_;
|
||||
\u{6F};
|
||||
℘; // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
ZW__NJ; // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
ZW__J; // DO NOT CHANGE THE NAME OF THIS FIELD
|
@ -0,0 +1,63 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Invalid FieldDefinition, ClassElementName, PropertyName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
StringLiteral
|
||||
NumericLiteral
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart ::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart ::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue ::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
\u0000;
|
@ -0,0 +1,63 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Invalid FieldDefinition, ClassElementName, PropertyName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
StringLiteral
|
||||
NumericLiteral
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart ::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart ::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue ::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
\u200D_ZWJ;
|
@ -0,0 +1,63 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Invalid FieldDefinition, ClassElementName, PropertyName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
StringLiteral
|
||||
NumericLiteral
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart ::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart ::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue ::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
\u200C_ZWNJ;
|
68
src/class-fields/grammar-field-identifier.case
Normal file
68
src/class-fields/grammar-field-identifier.case
Normal file
@ -0,0 +1,68 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid FieldDefinition, ClassElementName, PropertyName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
StringLiteral
|
||||
NumericLiteral
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart ::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart ::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue ::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
$;
|
||||
_;
|
||||
\u{6F};
|
||||
\u2118;
|
||||
ZW_\u200C_NJ;
|
||||
ZW_\u200D_J;
|
27
src/class-fields/grammar-fields-multi-line.case
Normal file
27
src/class-fields/grammar-fields-multi-line.case
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid multi-line, multi-field
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
x
|
||||
y
|
26
src/class-fields/grammar-fields-same-line-error.case
Normal file
26
src/class-fields/grammar-fields-same-line-error.case
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: SyntaxError
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-public]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
x y
|
@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName = Initializer Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
Initializer :
|
||||
= AssignmentExpression
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#$ = 1;
|
||||
#_ = 2;
|
||||
#\u{6F} = 3;
|
||||
#℘ = 4; // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
#ZW__NJ = 5; // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
#ZW__J = 6; // DO NOT CHANGE THE NAME OF THIS FIELD
|
@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName = Initializer Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
Initializer :
|
||||
= AssignmentExpression
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#$ = 1;
|
||||
#_ = 2;
|
||||
#\u{6F} = 3;
|
||||
#\u2118 = 4;
|
||||
#ZW_\u200C_NJ = 5;
|
||||
#ZW_\u200D_J = 6;
|
29
src/class-fields/grammar-privatename-error.case
Normal file
29
src/class-fields/grammar-privatename-error.case
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: No space allowed between sigial and IdentifierName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
# x
|
@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#\u0000;
|
@ -0,0 +1,58 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#\u200D_ZWJ;
|
||||
|
@ -0,0 +1,58 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/invalid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#\u200C_ZWNJ;
|
||||
|
@ -0,0 +1,91 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: PrivateName Static Semantics, StringValue
|
||||
esid: sec-private-names-static-semantics-stringvalue
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
|
||||
1. Return the String value consisting of the sequence of code
|
||||
units corresponding to PrivateName. In determining the sequence
|
||||
any occurrences of \ UnicodeEscapeSequence are first replaced
|
||||
with the code point represented by the UnicodeEscapeSequence
|
||||
and then the code points of the entire PrivateName are converted
|
||||
to code units by UTF16Encoding (10.1.1) each code point.
|
||||
|
||||
template: productions
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#\u{6F};
|
||||
#\u2118;
|
||||
#ZW_\u200C_NJ;
|
||||
#ZW_\u200D_J;
|
||||
//- privateinspectionfunctions
|
||||
o(value) {
|
||||
this.#o = value;
|
||||
return this.#o;
|
||||
}
|
||||
℘(value) {
|
||||
this.#℘ = value;
|
||||
return this.#℘;
|
||||
}
|
||||
ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
|
||||
this.#ZW__NJ = value;
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
|
||||
this.#ZW__J = value;
|
||||
return this.#ZW__J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.o(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
62
src/class-fields/grammar-privatename-identifier.case
Normal file
62
src/class-fields/grammar-privatename-identifier.case
Normal file
@ -0,0 +1,62 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName Syntax
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#$;
|
||||
#_;
|
||||
#\u{6F};
|
||||
#\u2118;
|
||||
#ZW_\u200C_NJ;
|
||||
#ZW_\u200D_J;
|
@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: SyntaxError
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#x
|
||||
m() {}
|
30
src/class-fields/grammar-privatenames-multi-line.case
Normal file
30
src/class-fields/grammar-privatenames-multi-line.case
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: SyntaxError
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
template: syntax/valid
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#x
|
||||
#y
|
31
src/class-fields/grammar-privatenames-same-line-error.case
Normal file
31
src/class-fields/grammar-privatenames-same-line-error.case
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: SyntaxError
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
template: syntax/invalid
|
||||
negative:
|
||||
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#x #y
|
66
src/class-fields/rs-field-identifier-initializer.case
Normal file
66
src/class-fields/rs-field-identifier-initializer.case
Normal file
@ -0,0 +1,66 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid FieldDefinition
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
...
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
$ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1
|
||||
//- assertions
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
73
src/class-fields/rs-field-identifier.case
Normal file
73
src/class-fields/rs-field-identifier.case
Normal file
@ -0,0 +1,73 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid FieldDefinition
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
...
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
|
||||
PropertyName :
|
||||
LiteralPropertyName
|
||||
ComputedPropertyName
|
||||
|
||||
LiteralPropertyName :
|
||||
IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
$; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J
|
||||
//- assertions
|
||||
c.$ = 1;
|
||||
c._ = 1;
|
||||
c.\u{6F} = 1;
|
||||
c.\u2118 = 1;
|
||||
c.ZW_\u200C_NJ = 1;
|
||||
c.ZW_\u200D_J = 1;
|
||||
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
90
src/class-fields/rs-privatename-identifier-alt.case
Normal file
90
src/class-fields/rs-privatename-identifier-alt.case
Normal file
@ -0,0 +1,90 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#$; #_; #\u{6F}; #℘; #ZW__NJ; #ZW__J
|
||||
//- privateinspectionfunctions
|
||||
$(value) {
|
||||
this.#$ = value;
|
||||
return this.#$;
|
||||
}
|
||||
_(value) {
|
||||
this.#_ = value;
|
||||
return this.#_;
|
||||
}
|
||||
\u{6F}(value) {
|
||||
this.#\u{6F} = value;
|
||||
return this.#\u{6F};
|
||||
}
|
||||
℘(value) {
|
||||
this.#℘ = value;
|
||||
return this.#℘;
|
||||
}
|
||||
ZW__NJ(value) {
|
||||
this.#ZW__NJ = value;
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
ZW__J(value) {
|
||||
this.#ZW__J = value;
|
||||
return this.#ZW__J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
|
@ -0,0 +1,84 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW__NJ = 1; #ZW__J = 1
|
||||
//- privateinspectionfunctions
|
||||
$() {
|
||||
return this.#$;
|
||||
}
|
||||
_() {
|
||||
return this.#_;
|
||||
}
|
||||
\u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
℘() {
|
||||
return this.#℘;
|
||||
}
|
||||
ZW__NJ() {
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
ZW__J() {
|
||||
return this.#ZW__J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.℘(), 1);
|
||||
assert.sameValue(c.ZW__NJ(), 1);
|
||||
assert.sameValue(c.ZW__J(), 1);
|
||||
|
84
src/class-fields/rs-privatename-identifier-initializer.case
Normal file
84
src/class-fields/rs-privatename-identifier-initializer.case
Normal file
@ -0,0 +1,84 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1
|
||||
//- privateinspectionfunctions
|
||||
$() {
|
||||
return this.#$;
|
||||
}
|
||||
_() {
|
||||
return this.#_;
|
||||
}
|
||||
\u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
\u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.\u2118(), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(), 1);
|
||||
|
90
src/class-fields/rs-privatename-identifier.case
Normal file
90
src/class-fields/rs-privatename-identifier.case
Normal file
@ -0,0 +1,90 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
#$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J
|
||||
//- privateinspectionfunctions
|
||||
$(value) {
|
||||
this.#$ = value;
|
||||
return this.#$;
|
||||
}
|
||||
_(value) {
|
||||
this.#_ = value;
|
||||
return this.#_;
|
||||
}
|
||||
\u{6F}(value) {
|
||||
this.#\u{6F} = value;
|
||||
return this.#\u{6F};
|
||||
}
|
||||
\u2118(value) {
|
||||
this.#\u2118 = value;
|
||||
return this.#\u2118;
|
||||
}
|
||||
ZW_\u200C_NJ(value) {
|
||||
this.#ZW_\u200C_NJ = value;
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
ZW_\u200D_J(value) {
|
||||
this.#ZW_\u200D_J = value;
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.\u2118(1), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(1), 1);
|
||||
|
@ -0,0 +1,109 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid Static Method PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
static FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-static-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
static #$(value) {
|
||||
this.$ = value;
|
||||
return value;
|
||||
}
|
||||
static #_(value) {
|
||||
this.#stored = value;
|
||||
return value;
|
||||
}
|
||||
static #o(value) {
|
||||
this.#stored = value;
|
||||
return value;
|
||||
}
|
||||
static #℘(value) {
|
||||
this.#stored = value;
|
||||
return value;
|
||||
}
|
||||
static #ZW__NJ(value) {
|
||||
this.#stored = value;
|
||||
return value;
|
||||
}
|
||||
static #ZW__J(value) {
|
||||
this.#stored = value;
|
||||
return value;
|
||||
}
|
||||
//- privateinspectionfunctions
|
||||
static $(value) {
|
||||
return this.#$(value);
|
||||
}
|
||||
static _(value) {
|
||||
return this.#_(value);
|
||||
}
|
||||
static o(value) {
|
||||
return this.#o(value);
|
||||
}
|
||||
static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘(value);
|
||||
}
|
||||
static ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ(value);
|
||||
}
|
||||
static ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J(value);
|
||||
}
|
||||
|
||||
//- assertions
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
103
src/class-fields/rs-static-method-privatename-identifier.case
Normal file
103
src/class-fields/rs-static-method-privatename-identifier.case
Normal file
@ -0,0 +1,103 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid Static Method PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
static FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-static-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
static #$(value) {
|
||||
return value;
|
||||
}
|
||||
static #_(value) {
|
||||
return value;
|
||||
}
|
||||
static #\u{6F}(value) {
|
||||
return value;
|
||||
}
|
||||
static #\u2118(value) {
|
||||
return value;
|
||||
}
|
||||
static #ZW_\u200C_NJ(value) {
|
||||
return value;
|
||||
}
|
||||
static #ZW_\u200D_J(value) {
|
||||
return value;
|
||||
}
|
||||
//- privateinspectionfunctions
|
||||
static $(value) {
|
||||
return this.#$(value);
|
||||
}
|
||||
static _(value) {
|
||||
return this.#_(value);
|
||||
}
|
||||
static \u{6F}(value) {
|
||||
return this.#\u{6F}(value);
|
||||
}
|
||||
static \u2118(value) {
|
||||
return this.#\u2118(value);
|
||||
}
|
||||
static ZW_\u200C_NJ(value) {
|
||||
return this.#ZW_\u200C_NJ(value);
|
||||
}
|
||||
static ZW_\u200D_J(value) {
|
||||
return this.#ZW_\u200D_J(value);
|
||||
}
|
||||
|
||||
//- assertions
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
91
src/class-fields/rs-static-privatename-identifier-alt.case
Normal file
91
src/class-fields/rs-static-privatename-identifier-alt.case
Normal file
@ -0,0 +1,91 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid Static PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
static FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-static-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
static #$; static #_; static #\u{6F}; static #℘; static #ZW__NJ; static #ZW__J
|
||||
//- privateinspectionfunctions
|
||||
static $(value) {
|
||||
this.#$ = value;
|
||||
return this.#$;
|
||||
}
|
||||
static _(value) {
|
||||
this.#_ = value;
|
||||
return this.#_;
|
||||
}
|
||||
static o(value) {
|
||||
this.#\u{6F} = value;
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
this.#℘ = value;
|
||||
return this.#℘;
|
||||
}
|
||||
static ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
this.#ZW__NJ = value;
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
this.#ZW__J = value;
|
||||
return this.#ZW__J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
@ -0,0 +1,85 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid Static PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
static FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-static-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW__NJ = 1; static #ZW__J = 1
|
||||
//- privateinspectionfunctions
|
||||
static $() {
|
||||
return this.#$;
|
||||
}
|
||||
static _() {
|
||||
return this.#_;
|
||||
}
|
||||
static \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static ℘() {
|
||||
return this.#℘;
|
||||
}
|
||||
static ZW__NJ() {
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static ZW__J() {
|
||||
return this.#ZW__J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
@ -0,0 +1,85 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid Static PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
static FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-static-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1
|
||||
//- privateinspectionfunctions
|
||||
static $() {
|
||||
return this.#$;
|
||||
}
|
||||
static _() {
|
||||
return this.#_;
|
||||
}
|
||||
static \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.\u2118(), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(), 1);
|
||||
|
91
src/class-fields/rs-static-privatename-identifier.case
Normal file
91
src/class-fields/rs-static-privatename-identifier.case
Normal file
@ -0,0 +1,91 @@
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Valid Static PrivateName
|
||||
info: |
|
||||
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
static MethodDefinition
|
||||
FieldDefinition ;
|
||||
static FieldDefinition ;
|
||||
;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer _opt
|
||||
|
||||
ClassElementName :
|
||||
PropertyName
|
||||
PrivateName
|
||||
|
||||
PrivateName ::
|
||||
# IdentifierName
|
||||
|
||||
IdentifierName ::
|
||||
IdentifierStart
|
||||
IdentifierName IdentifierPart
|
||||
|
||||
IdentifierStart ::
|
||||
UnicodeIDStart
|
||||
$
|
||||
_
|
||||
\ UnicodeEscapeSequence
|
||||
|
||||
IdentifierPart::
|
||||
UnicodeIDContinue
|
||||
$
|
||||
\ UnicodeEscapeSequence
|
||||
<ZWNJ> <ZWJ>
|
||||
|
||||
UnicodeIDStart::
|
||||
any Unicode code point with the Unicode property "ID_Start"
|
||||
|
||||
UnicodeIDContinue::
|
||||
any Unicode code point with the Unicode property "ID_Continue"
|
||||
|
||||
|
||||
NOTE 3
|
||||
The sets of code points with Unicode properties "ID_Start" and
|
||||
"ID_Continue" include, respectively, the code points with Unicode
|
||||
properties "Other_ID_Start" and "Other_ID_Continue".
|
||||
|
||||
template: productions
|
||||
features: [class-static-fields-private]
|
||||
---*/
|
||||
|
||||
//- fields
|
||||
static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
|
||||
//- privateinspectionfunctions
|
||||
static $(value) {
|
||||
this.#$ = value;
|
||||
return this.#$;
|
||||
}
|
||||
static _(value) {
|
||||
this.#_ = value;
|
||||
return this.#_;
|
||||
}
|
||||
static \u{6F}(value) {
|
||||
this.#\u{6F} = value;
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static \u2118(value) {
|
||||
this.#\u2118 = value;
|
||||
return this.#\u2118;
|
||||
}
|
||||
static ZW_\u200C_NJ(value) {
|
||||
this.#ZW_\u200C_NJ = value;
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static ZW_\u200D_J(value) {
|
||||
this.#ZW_\u200D_J = value;
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2018 Rick Waldron. 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-invalid-
|
||||
features: [class]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
/*{ fields }*/
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2018 Rick Waldron. 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-invalid-
|
||||
features: [class]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
/*{ fields }*/
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2018 Rick Waldron. 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-valid-
|
||||
features: [class]
|
||||
---*/
|
||||
|
||||
class C {
|
||||
/*{ fields }*/
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2018 Rick Waldron. 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-valid-
|
||||
features: [class]
|
||||
---*/
|
||||
|
||||
var C = class {
|
||||
/*{ fields }*/
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user