tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

after-same-line-static-gen-rs-field-identifier.js (2185B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/class-elements/rs-field-identifier.case
      3 // - src/class-elements/productions/cls-decl-after-same-line-static-gen.template
      4 /*---
      5 description: Valid FieldDefinition (field definitions after a static generator in the same line)
      6 esid: prod-FieldDefinition
      7 features: [class-fields-public, generators, class]
      8 flags: [generated]
      9 includes: [propertyHelper.js]
     10 info: |
     11    ClassElement :
     12      ...
     13      FieldDefinition ;
     14      ;
     15 
     16    FieldDefinition :
     17      ClassElementName Initializer _opt
     18 
     19    ClassElementName :
     20      PropertyName
     21 
     22    PropertyName :
     23      LiteralPropertyName
     24      ComputedPropertyName
     25 
     26    LiteralPropertyName :
     27      IdentifierName
     28 
     29    IdentifierName ::
     30      IdentifierStart
     31      IdentifierName IdentifierPart
     32 
     33    IdentifierStart ::
     34      UnicodeIDStart
     35      $
     36      _
     37      \ UnicodeEscapeSequence
     38 
     39    IdentifierPart::
     40      UnicodeIDContinue
     41      $
     42      \ UnicodeEscapeSequence
     43      <ZWNJ> <ZWJ>
     44 
     45    UnicodeIDStart::
     46      any Unicode code point with the Unicode property "ID_Start"
     47 
     48    UnicodeIDContinue::
     49      any Unicode code point with the Unicode property "ID_Continue"
     50 
     51 
     52    NOTE 3
     53    The sets of code points with Unicode properties "ID_Start" and
     54    "ID_Continue" include, respectively, the code points with Unicode
     55    properties "Other_ID_Start" and "Other_ID_Continue".
     56 
     57 ---*/
     58 
     59 
     60 class C {
     61  static *m() { return 42; } $; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J;
     62  
     63 }
     64 
     65 var c = new C();
     66 
     67 assert.sameValue(C.m().next().value, 42);
     68 assert(
     69  !Object.prototype.hasOwnProperty.call(c, "m"),
     70  "m doesn't appear as an own property on the C instance"
     71 );
     72 assert(
     73  !Object.prototype.hasOwnProperty.call(C.prototype, "m"),
     74  "m doesn't appear as an own property on the C prototype"
     75 );
     76 
     77 verifyProperty(C, "m", {
     78  enumerable: false,
     79  configurable: true,
     80  writable: true,
     81 });
     82 
     83 c.$ = 1;
     84 c._ = 1;
     85 c.\u{6F} = 1;
     86 c.\u2118 = 1;
     87 c.ZW_\u200C_NJ = 1;
     88 c.ZW_\u200D_J = 1;
     89 
     90 assert.sameValue(c.$, 1);
     91 assert.sameValue(c._, 1);
     92 assert.sameValue(c.\u{6F}, 1);
     93 assert.sameValue(c.\u2118, 1);
     94 assert.sameValue(c.ZW_\u200C_NJ, 1);
     95 assert.sameValue(c.ZW_\u200D_J, 1);
     96 
     97 reportCompare(0, 0);