regular-definitions-rs-field-identifier-initializer.js (1642B)
1 // This file was procedurally generated from the following sources: 2 // - src/class-elements/rs-field-identifier-initializer.case 3 // - src/class-elements/productions/cls-decl-regular-definitions.template 4 /*--- 5 description: Valid FieldDefinition (regular fields defintion) 6 esid: prod-FieldDefinition 7 features: [class-fields-public, class] 8 flags: [generated] 9 info: | 10 ClassElement : 11 ... 12 FieldDefinition ; 13 ; 14 15 FieldDefinition : 16 ClassElementName Initializer _opt 17 18 ClassElementName : 19 PropertyName 20 21 PropertyName : 22 LiteralPropertyName 23 ComputedPropertyName 24 25 LiteralPropertyName : 26 IdentifierName 27 28 IdentifierName :: 29 IdentifierStart 30 IdentifierName IdentifierPart 31 32 IdentifierStart :: 33 UnicodeIDStart 34 $ 35 _ 36 \ UnicodeEscapeSequence 37 38 IdentifierPart:: 39 UnicodeIDContinue 40 $ 41 \ UnicodeEscapeSequence 42 <ZWNJ> <ZWJ> 43 44 UnicodeIDStart:: 45 any Unicode code point with the Unicode property "ID_Start" 46 47 UnicodeIDContinue:: 48 any Unicode code point with the Unicode property "ID_Continue" 49 50 51 NOTE 3 52 The sets of code points with Unicode properties "ID_Start" and 53 "ID_Continue" include, respectively, the code points with Unicode 54 properties "Other_ID_Start" and "Other_ID_Continue". 55 56 ---*/ 57 58 59 class C { 60 $ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1 61 62 } 63 64 var c = new C(); 65 66 assert.sameValue(c.$, 1); 67 assert.sameValue(c._, 1); 68 assert.sameValue(c.\u{6F}, 1); 69 assert.sameValue(c.\u2118, 1); 70 assert.sameValue(c.ZW_\u200C_NJ, 1); 71 assert.sameValue(c.ZW_\u200D_J, 1); 72 73 reportCompare(0, 0);