Debian Codegraph @

js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/class-elements/rs-static-generator-method-privatename-identifier.case
3 // - src/class-elements/productions/cls-decl-regular-definitions.template
4 /*---
5 description: Valid Static GeneratorMethod PrivateName (regular fields defintion)
6 esid: prod-FieldDefinition
7 features: [class-static-methods-private, class, class-fields-public]
8 flags: [generated]
9 info: |
10 ClassElement :
11 MethodDefinition
12 static MethodDefinition
13 FieldDefinition ;
14 static FieldDefinition ;
15 ;
16
17 MethodDefinition :
18 GeneratorMethod
19
20 GeneratorMethod :
21 * ClassElementName ( UniqueFormalParameters ){ GeneratorBody }
22
23 ClassElementName :
24 PropertyName
25 PrivateName
26
27 PrivateName ::
28 # IdentifierName
29
30 IdentifierName ::
31 IdentifierStart
32 IdentifierName IdentifierPart
33
34 IdentifierStart ::
35 UnicodeIDStart
36 $
37 _
38 \ UnicodeEscapeSequence
39
40 IdentifierPart::
41 UnicodeIDContinue
42 $
43 \ UnicodeEscapeSequence
44 <ZWNJ> <ZWJ>
45
46 UnicodeIDStart::
47 any Unicode code point with the Unicode property "ID_Start"
48
49 UnicodeIDContinue::
50 any Unicode code point with the Unicode property "ID_Continue"
51
52
53 NOTE 3
54 The sets of code points with Unicode properties "ID_Start" and
55 "ID_Continue" include, respectively, the code points with Unicode
56 properties "Other_ID_Start" and "Other_ID_Continue".
57
58 ---*/
59
60
61 class C {
62 static * #$(value) {
63 yield * value;
64 }
65 static * #_(value) {
66 yield * value;
67 }
68 static * #\u{6F}(value) {
69 yield * value;
70 }
71 static * #\u2118(value) {
72 yield * value;
73 }
74 static * #ZW_\u200C_NJ(value) {
75 yield * value;
76 }
77 static * #ZW_\u200D_J(value) {
78 yield * value;
79 }
80 static get $() {
81 return this.#$;
82 }
83 static get _() {
84 return this.#_;
85 }
86 static get \u{6F}() {
87 return this.#\u{6F};
88 }
89 static get \u2118() {
90 return this.#\u2118;
91 }
92 static get ZW_\u200C_NJ() {
93 return this.#ZW_\u200C_NJ;
94 }
95 static get ZW_\u200D_J() {
96 return this.#ZW_\u200D_J;
97 }
98
99 }
100
101 var c = new C();
102
103 assert.sameValue(C.$([1]).next().value, 1);
104 assert.sameValue(C._([1]).next().value, 1);
105 assert.sameValue(C.\u{6F}([1]).next().value, 1);
106 assert.sameValue(C.\u2118([1]).next().value, 1);
107 assert.sameValue(C.ZW_\u200C_NJ([1]).next().value, 1);
108 assert.sameValue(C.ZW_\u200D_J([1]).next().value, 1);
109
110
111 reportCompare(0, 0);