tor-browser

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

wrapped-in-sc-rs-privatename-identifier-initializer.js (1955B)


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